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

Daniel Bünzli daniel.buenzli at erratique.ch
Wed Feb 27 12:53:56 GMT 2013


Le mercredi, 27 février 2013 à 12:51, Leo White a écrit :
> I also think that open statements (even at the top of a file) are a very
> good thing. They show which libraries the file is going to use. Currently,  
> a file using a library that does not use pack will simply launch straight  
> into using modules with short names that give no indication of their  
> origin. I must look in the build system to find out what they refer to. By  
> encouraging people to use namespaces, these files will instead start with  
> "open namespace Foo", and it will be obvious what libraries they are using.

Note however that this still won't tell you where a particular short module name comes from, especially if you have multiple open statements. Besides for single module libraries --- the way I like to design --- is seems rather pointless to have to say `open namespace Xmlm` to be able to use the Xmlm module.  

Daniel




More information about the Platform mailing list