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
[Caml-list] packing Ocaml standard library into Std "namespace"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-24 (21:47)
From: Dmitry Bely <dbely@m...>
Subject: [Caml-list] packing Ocaml standard library into Std "namespace"
Ocaml 3.05 and above introduces new packing facility (ocamlc "-pack"
option). What do you think of using it to pack all Ocaml standard modules
into one big Std module so that the user code could use them as
Std.List.something, Std.Array.something etc. (having an analog of C++
std:: namespace)?

Of course, the old "flat" standard modules should also be left in the
distribution to preserve existing code compatibility, but their direct use
will be deprecated (or not recommended).

I think this will help us reduce the name clash dramatically. E.g. I have
just discovered that I cannot modify ocamlild compiler to use Array.of_list
somethere inside, because it already contains array.ml source file, that
overlaps standard Array module. Having Std module, I just would write
Std.Array.of_string there.

How do you think, does this make any sense?

- Dmitry Bely

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