[ocaml-platform] on the need and design of OCaml namespaces

Christophe TROESTLER Christophe.Troestler at umons.ac.be
Tue Feb 26 18:00:37 GMT 2013


On Tue, 26 Feb 2013 09:31:53 -0800, David Brown wrote:
> 
> Christophe TROESTLER <Christophe.Troestler at umons.ac.be> writes:
> 
> > It seems to me that the openness of namespaces is the only feature I
> > have seen mentioned that modules do not have.  But is the openness of
> > namespaces something considered useful?  What problem does this solves?
> 
> The simplest case is that it allows different packets to put things in
> under the same hierarchy.  As an example, from Haskell:
> 
>    Data.List  from 'base'
>    Data.Array from 'array'
>    Data.Text  from 'text' - which is not part of the distribution
> 
> without openness, these would all need a different prefix.

Right but you say what openness is, not why you want it.  IMHO, it is
unlikely you want to say "open namespace Data"; it is more a
convenience for documentation and can be handled at another level.


More information about the Platform mailing list