At the moment, there is no difference between modules and namespaces. Among other things, this means that if I write an extension MyList to List and someone else writes and extension HisList to List, there is no automated way to merge these, I need to write yet another module LatestList to be able to use both extensions at the same time. While this is certainly possible, it's also quite clumsy and prevents drop-in additions to existing modules (or hierarchies, yes) by third-party libraries, something which, as Richard Jones points out, may be important.
All of this is due to the fact that modules are closed: once a module has been written, there is no way to add something to that module without altering the source code or writing a new module. Now, David Allsopp suggested (off-list) that we could perhaps implement namespaces as a Camlp4 extension, with the use of external configuration files (something which can already be managed with findlib). I'm shamelessly forwarding his idea and asking for feedback. Where we have [open List] to open one specific module called [List], we could introduce * [use List] to open all the modules registered as providing namespace [List] * [import List] to locally rebind [List] to a module obtained by including all the modules registered as providing namespace [List] In each case, finding out which modules are registered as providing namespace [List] is performed statically, by Camlp4 reading a set of external configuration files. What do you think? Cheers, David -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations. _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs