English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
RE: [Caml-list] recursive modules redux, & interface files
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-03-27 (15:12)
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
that all the runtime dynamic checks that verify that data is initialized
before use 
succeed).  And OCaml already have "external" in interfaces, which only
added performance, not extra expressive power.  Phase distinction
annotations seem
as least as useful in practice, and a whole lot simpler than the other
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".

To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr