Browse thread
RE: [Caml-list] Namespace proposal
- Gurr, David (MED, self)
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2002-08-15 (20:42) |
From: | Gurr, David (MED, self) <David.Gurr@m...> |
Subject: | RE: [Caml-list] Namespace proposal |
> -----Original Message----- > From: Fernando Alegre [mailto:fernando@cc.gatech.edu] > Sent: Thursday, August 15, 2002 10:46 AM > To: caml-list@inria.fr > Subject: Re: [Caml-list] Namespace proposal > > > On Thu, Aug 15, 2002 at 12:13:47PM -0500, Gurr, David (MED, > self) wrote: > > > > > For me package is not a modules collection, but just > > > a way of multi-word module naming. It's not so easy to > > > give short and still adequate names to the modules, but > > > something like Db.Core.Storage looks much better then > > > Dbstorage, and Storage can still be accessed just as > > > "Storage" from modules of the same "package". Just a naming > > > way, nothing more. > > > > And what happens when you need to abstract over a > module/sub-package? -D > > I think a naming convention like this is definitely needed, > but in order > not to be confused with sub-modules, a different character > should be used. > For example: > > Db/Core/Storage could be a legal module name (in > Db/Core/storage.ml), and > Db.Core.Storage could be a module hierarchy defined in Db.ml, and > Db/Core/Storage.Medium could be a submodule defined in > Db/Core/storage.ml,... > > An added advantage of this syntax is that it is consistent > with the overall > esthetics of the OCaml language (i.e., ugly). :-) > > Fernando > I agree with the ugly part. But it is consistent with C not OCaml, IMHO. The difference between structures (ie first order modules) and packages as far as I can see is that you can abstract over modules and you can individually type check modules. If you have a language where abstraction and type checking are non-existent then packages might be a fine thing. Separate compilation for nested modules and a name mangling scheme for their file names might be useful for OCaml. -D ------------------- 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