[ocaml-platform] on the need and design of OCaml namespaces
Xavier Clerc
xavier.clerc at inria.fr
Fri Feb 22 08:54:37 GMT 2013
----- Mail original -----
> On Thu, Feb 21, 2013 at 07:23:19PM +0100, Alain Frisch wrote:
> > What would be the justification for hierarchical names?
>
> One of the advantages that comes to mind is the ability to piggyback
> on
> already existing, world-wide, unambiguous, hierarchical namespaces
> out
> there, such as DNS. It's overly verbose, but if you dream of a very
> widespread adoption of the language (a-la Java), then namespaces like
> org.apache.... have their advantages in terms of scalability.
I concur. However, I would like to draw your attention on the fact that
hierarchical names tend to convey the intuition that the parent element
somehow "contains" the children elements. In Java, this is an incorrect
assumption, as the namespace is indeed flat. My bet is that if hierarchical
names are used, it has to be reflected in the semantics.
More generally on the subject of namespaces, shouldn't we assess the
merits and mistakes of their equivalents in other languages?
Regards,
Xavier
More information about the Platform
mailing list