Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Completeness of "Unix" run-time library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: [Caml-list] Modules and namespaces
On Fri, Mar 19, 2004 at 10:49:27AM +0100, Wolfgang Müller wrote:
> To get back to the perl example:
[perl example]
> However, for toplevel namespaces, you have to write to a mailing
> list, and there is a group of people who decide if to accept the new
> toplevel namespace or not. This is a (AFAIK also known) bottleneck..

Actually, getting a toplevel namespace accepted is not necessary with
Perl.  It's advisable, a nice thing to do, etc., but not necessary for
uploading a module to CPAN.

Another thing which is being overlooked here is that ocaml has two
types of namespace:

(1) The normal module namespace

(2) Which paths get searched using -I +subdir

For instance, I have a module called Dbi which is located in the
-I +dbi subdirectory.

It would be quite possible for someone else to write a Dbi module
located in the -I +anotherdbi directory.  No conflict would arise
unless some strange person wanted to use both types of Dbi module
in their program - an unlikely occurrence presumably.

As for complex module namespaces: Perl gets away with a very loose
definition.  All modules which count are at either the top level or
the second level, eg:

CGI
Net::FTP
IO::Handle

Java, by contrast, has a horrible ham-fisted namespace mechanism which
is great example of overengineering a problem to death.

Stick with short 1- or 2-level names for modules, please.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Perl4Caml lets you use any Perl library in your type-safe Objective
CAML programs. http://www.merjis.com/developers/perl4caml/

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners