[ocaml-platform] on the need and design of OCaml namespaces
Leo White
lpw25 at cam.ac.uk
Fri Feb 22 16:40:25 GMT 2013
> Actually I find this way of structuring things not pertinent *at all*. It
> brings absolutely nothing.
>
> First with hierarchies there's always the problem that at certain point
> you want two things to be in two different places. This is why "tags" are
> usually better than "folders" to organize things, see e.g. gmail.
There is no real reason that something cannot be placed in two locations
within the hierarchy.
> Second if we take the link you provided there are not so much toplevel
> descriptors which means that it lengthen the names without bringing much
> benefit except noise.
I agree with this in general. However, there are some specific cases where
a hierarchical namespace is very useful. For example:
1. In some very large libraries, it is useful to be able to divide the
modules into sub-components that can opened individually.
2. In some libraries it is useful to provide multiple versions of some
components (e.g. Foo.Async.Io and Foo.Lwt.Io).
Since it doesn't cost anything to support hierarchical namespaces, I see no
strong reason to not do so.
More information about the Platform
mailing list