[ocaml-platform] Changes to my previous proposal for namespaces
Edgar Friendly
thelema314 at gmail.com
Mon Mar 18 17:40:00 GMT 2013
>
> > Why can't we have the same clear ordering everywhere for namespaces?
> > What's wrong with having namespaces take on the same kind of ordered
> > semantics that modules have?
>
> This would require namespaces to have closed definitions. This would
> require a completely different model from the one I have proposed. It
> would be less flexible, less powerful, less lightweight, and probably
> harder to use.
>
...
> A closed definition is one of the constraints forced on modules by their
> need to be represented at run-time as a record. One of the motivations
> for namespaces is to provide a system for containing modules that is not
> bound by these restrictions. I don't see it as looking for a break with
> the semantics of modules, so much as implementing a more flexible
> semantics than what is possible with modules.
>
> This is one thing I don't quite understand. Yes, modules are implemented
as records at runtime, but there's no requirement that namespaces have any
runtime representation; I don't see why they can't exist at compile time
only as something to make changes to the compilation environment when
invoked (open or # or whatever). As far as the open/closed distinction,
hasn't gasche has gone over this; they can be treated as closed by the
compiler during compilation even if they're open all the rest of the time.
E.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/platform/attachments/20130318/bb1a9a95/attachment.html>
More information about the Platform
mailing list