Browse thread
RE: [Caml-list] Namespace proposal
[
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: | -- (:) |
| From: | Fernando Alegre <fernando@c...> |
| 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 ------------------- 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