[ocaml-platform] on the need and design of OCaml namespaces
Daniel Bünzli
daniel.buenzli at erratique.ch
Fri Feb 22 14:33:57 GMT 2013
Le vendredi, 22 février 2013 à 14:52, Malcolm Matalka a écrit :
> So would a syntax extension always have to store the modules it wants to
> be sure to access at the beginning of a file it requires, making sure
> not to choose overlapping names?
Why not ? Each extension could have its own module against which you have to link to use the extension that has the module it uses in it (MyExt.List…).
It's not evident to me that namespaces actually solve the problem either, they just seem to push the problem in the build system. The actual problem seems very related to the problem of hygienic macros (accidental name capture).
Besides I'm not sure the example Anil gave is as widespread as it seems, it feels like a corner case that could be avoided, as he suggested, by having the ability to refer to stdlib's modules under a toplevel name (OCaml.List) and this still seems in the realm of the module system (and could be realized via something like cmia).
Daniel
More information about the Platform
mailing list