[ocaml-platform] on the need and design of OCaml namespaces
David Brown
caml at davidb.org
Tue Feb 26 17:31:53 GMT 2013
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.
Admittedly, Haskell has it much easier, since modules are very simple,
and cannot be manipulated within the language, other than the contents
of a particular file being a single module.
David
More information about the Platform
mailing list