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

Yaron Minsky yminsky at janestreet.com
Mon Feb 25 19:16:03 GMT 2013


On Mon, Feb 25, 2013 at 1:04 PM, Daniel Bünzli
<daniel.buenzli at erratique.ch> wrote:
>
>
> Le vendredi, 22 février 2013 à 22:51, Xavier Clerc a écrit :
>
>> So, as of today, we have :- "archives" (cma / cmxa) allowing to gather modules but without
>> naming (at the language level) the gathering ;
>> - "packs" allowing to gather modules into a module.
>> I regard namespaces are gathering modules into a named entity but
>> without creating a module. Hence, it is a new beast, different from
>> archives and packs.
>
> So basically a new concept is introduced because "pack" is not
> technically satisfying. That's not the way I would like the language
> I program in to be designed. I'd rather see the problems pack has
> fixed which I'm sure could be done by allowing archives to be named
> at the language level as a module.

You might be right, but I think there's a deep issue here that
shouldn't be dismissed so lightly.  The argument is that modules are
simply too powerful to be used as the complete solution to namespace
management.  Deciding that the only principled approach is to always
pick the most powerful, most general purpose primitive is attractive,
but not always sane...

y


More information about the Platform mailing list