English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
RE: [Caml-list] Namespace proposal
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-18 (17:07)
From: John Max Skaller <skaller@o...>
Subject: Re: [Caml-list] Namespace proposal
Gurr, David (MED, self) wrote:

> My two cents worth: Please dont copy package ideas from 
> languages that lack functors.  And Java's package ==
> directory idea is far from beloved by all.  -D

While I agree that 'package == directory' has problems,
languages that do not properly allow installation
of third party packages in such a way as to avoid
name clashes in supporting components, have even
more problems.

Ocaml is in this position. It can't be easily
use in large projects which incorporate many third
party libraries.

Separable installation
is possible but clumbsy (use OCAMLPATH),
but there is no associated mechanism for nameclash avoidance.

In theory, one could use nested modules to avoid nameclashes.
In practice that is out of the question because
it requires all the modules be in one file.

C had exactly the same problem, which is why
C++ added namespaces (independently of
file locations). Python had this problem,
which is why it added packages (dependent on
directory structure).

I personally favour the Eiffel approach because
it is the most flexible -- the dependence of
top level component names on files/directories
is defined by a secondary configuration language.
However, it is a somewhat heavy approach.

One thing is for sure though. The ability to install
third party packages in directories, and the ability
to avoid name clashes in supporting components,
are both required for programming in the large.

Ocaml is so close to a solution: both separable
installation and name clash avoidance are possible,
but the mechanisms cannot be easily integrated.

John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.

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