[ocaml-platform] An alternative proposal for namespaces
Fermin Reig
ferminreig at fastmail.fm
Fri Mar 22 09:14:15 GMT 2013
The following paper (and its implementation in the SML/NJ compiler) is
probably relevant to this discussion. (Section 2.4 is on names and name
spaces).
Hierarchical Modularity.
Matthias Blume and Andrew W. Appel.
In ACM Transactions on Programming Languages and Systems, Volume 21,
No. 4 (July 1999).
(available athttp://people.cs.uchicago.edu/~blume/pub-cat.html
<http://people.cs.uchicago.edu/%7Eblume/pub-cat.html>)
andits implementation for SML/NJ
http://www.smlnj.org/doc/CM/index.html
<http://www.smlnj.org/doc/CM/index.html>
HTH,
Fermin
On 22/03/13 08:53, Alain Frisch wrote:
> On 03/21/2013 01:16 PM, Alain Frisch wrote:
>> I won't continue on this topic of "simple namespace" vs "search path
>> files"-only for namespaces, because we don't make progress and it
>> doesn't seem we are going to reach an agreement. Let's agree to
>> disagree on this point.
>
> A related but different point is about allowing "-" in compilation
> unit names. If a library ships units with this character in their
> filenames, client close will be forced to go through namepaced module
> names, which means not only adapting the code but also their build
> system. As soon as namespaces will be available, some libraries will
> start using them, but some code bases or existing tools might not be
> ready at that time. Providing a way for namespace-unaware code bases
> and tools to use namespaced libraries can only facilitate the
> migration phase, even if in the long term, using lower-level unit
> names in client code is not a good idea.
>
> Being friendly to newcomers is important for the language adoption,
> but being friendly to long-time users and avoiding breakage of
> existing tools is also important for the perception of our language as
> a mature system for large scale use. And in that case it's not like
> being friendly to long-time users is difficult: we simply need to keep
> the constraint that compilation unit names are also valid module
> names, which can be used directly in source code without relying on
> new namespace features.
>
>
> Alain
> _______________________________________________
> Platform mailing list
> Platform at lists.ocaml.org
> http://lists.ocaml.org/listinfo/platform
More information about the Platform
mailing list