[ocaml-platform] Followup to Leo's proposal

Alain Frisch alain.frisch at lexifi.com
Wed Mar 13 12:28:35 GMT 2013


I'm still unconvinced about the need of hierarchical namespaces and the 
fact that they don't introduce extra complexity.

One point I'd like to understand better in Leo's proposal (and related 
ones) in particular is how the following code would be interpreted:


   open namespace N1
   open namespace N2
   open namespace N3

   module X = Foo

In which namespaces would module Foo be looked up for?  One possibility 
would be to look it in:

    N1
    N2
    N1#N2
    N3
    N1#N3
    N1#N2#N3

If this is the case, what would be the priority?

Another possibility would be to decide upon the "open namespace N2" what 
N2 refers to (a toplevel namespace or a sub-namespace of N1).  Is it the 
intention?  What would be the criterion?



Alain


More information about the Platform mailing list