Browse thread
Compiler feature - useful or not?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alain Frisch <alain@f...> |
| Subject: | Re: [Caml-list] Compiler feature - useful or not? |
Pierre Weis wrote: > type row = private int;; The only difference with an abstract type is that some generic operations (comparision, equality) can be optimized, and currently, it happens only for some basic types. So exporting a private abbreviation (instead of an abstract type) is useless when the type is not a basic type. Is it correct? I find it somewhat disturbing to expose low-level optimization features as part of the type system. Couldn't a similar thing (specializing operations on integers) be achieved by always storing manifest types in .cmxs files? (Within a single compilation unit, the compiler could keep type definitions across module boundaries.) Alain