[ocaml-platform] Changes to my previous proposal for namespaces

Leo White lpw25 at cam.ac.uk
Mon Mar 18 18:28:30 GMT 2013


>     Ensuring a well-defined ordering between multiple "automatically opened
>     modules" would require namespaces to be closed all the time, not just
>     during a particular compilation.
>
> The reason for this evades me; I don't see why ordering module includes would require namespaces to be closed all the
> time.  Is this because the open order of namespaces used by all compilation units of a project must have a consistent
> ordering?  As far as shadowing is concerned, this shouldn't be a problem; each module can bind to different sets of
> identifiers.  As for link order, can't this just be determined by the namespace order at link time?  What am I missing?

I'm afraid I don't really follow this paragraph.

When I say that a namespace must be closed I mean that it must be
defined in a single location (i.e. within a single file). 

When I say that namespaces must be closed all the time, not just during
a particular compilation, I mean that it is not sufficient for the
compiler to look up the separate parts of an open definition and then
merge them into a single closed definition to use for the duration of a
particular compilation.


More information about the Platform mailing list