Version française
Home     About     Download     Resources     Contact us    
Browse thread
Wanted: your feedback on the hierarchy of OCaml Batteries Included
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefano Zacchiroli <zack@u...>
Subject: Re: [Caml-list] Wanted: your feedback on the hierarchy of OCaml Batteries Included
On Tue, Nov 18, 2008 at 10:06:25AM +0000, Richard Jones wrote:
> Your biggest problem is using dot ('.') instead of underscore ('_').
> Using a dot means that the System namespace cannot be extended by
> external packages.  If you use an underscore then an external package
> can extend the namespace (eg. by providing System_Newpackage)

As can be evinced from David's reply, this "biggest problem" comes
from the fact that extension by the means of external libraries was
not a design goal :) But you're right in stating that once one have a
hierarchical organized library, the temptation of adding your own
libraries (you is a third-party contributor here) into it is high.

Still, I'm not sure this problem should be addressed at the Batteries
level. To some extent we have just inherited limitations of the module
system, like the fact that packed module cannot be separately compiled
(or the annoying link all together issue).  Frankly I wouldn't like to
give up the hierarchy in favor of "_" for this limitation, before at
least trying to understand if in the future the limitations can be
lifted.

There might be an alternative though:

- use "_" and rely on some syntax extensions to retain the advantages
  of the hierarchy, like the fact that you can open a "partial module
  path". We can for example use "__" as a hierarchy separator and have
  "open" treat that sequence as a "."

  No idea how hard that would be, or how many implications there will
  be; bluestorm?

Cheers.


-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime