Browse thread
RE: [Caml-list] recursive modules redux, & interface files
- Don Syme
[
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: | Don Syme <dsyme@m...> |
| Subject: | RE: [Caml-list] recursive modules redux, & interface files |
> > Isn't it feasible to annotate elements of signatures with > something that > > indicates that an identifier really is bound to a value, > rather than a > > module?? i.e. > > You probably meant "rather than a result of an arbitrary computation". Yes, sorry. > Yes, it can be done this way, and I believe such annotations in > signatures are necessary for a full treatment of recursion between > modules (the Holy Grail :-). However, they also pollute signatures > with "implementation details". I'm not sure this "pollution" is really at that bad, is it? Users always have the option of _not_ revealing the extra detail, though with the result that they can't do cross-module recursion (or at least they don't get a guarantee that all the runtime dynamic checks that verify that data is initialized before use succeed). And OCaml already have "external" in interfaces, which only gives added performance, not extra expressive power. Phase distinction annotations seem as least as useful in practice, and a whole lot simpler than the other techniques mentioned.... It seems a whole lot better than having users roll their own "unsafe" phase distinctions by hacking in "ref" indirections.... And if a different, better solution was found later, then, to use my suggested notation, you could just revert "value" to mean the same as "expr". Cheers, Don ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr