[ocaml-platform] An alternative proposal for namespaces

Alain Frisch alain.frisch at lexifi.com
Fri Mar 22 08:53:43 GMT 2013


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


More information about the Platform mailing list