From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA08416; Sun, 25 Aug 2002 01:16:24 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA08522 for ; Sun, 25 Aug 2002 01:16:23 +0200 (MET DST) Received: from mallaury.noc.nerim.net (mallaury.noc.nerim.net [62.4.17.82]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g7ON6Bv08359 for ; Sun, 25 Aug 2002 01:06:26 +0200 (MET DST) Received: from cobalt.max.fr (zoggy.net1.nerim.net [62.212.116.8]) by mallaury.noc.nerim.net (Postfix) with SMTP id 95F3162D9B; Sun, 25 Aug 2002 01:06:00 +0200 (CEST) Date: Sun, 25 Aug 2002 00:55:07 +0200 From: Maxence Guesdon To: Dmitry Bely Cc: caml-list@inria.fr Subject: Re: [Caml-list] packing Ocaml standard library into Std "namespace" Message-Id: <20020825005507.4ec07867.maxence.guesdon@inria.fr> In-Reply-To: References: Organization: INRIA X-Mailer: Sylpheed version 0.6.6 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, > 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)? Hum, Using Std.List.iter instead of just List.iter would be a pain for me since I never 'open' standard modules. I could still open Std at the beginning of each module but the best would then for the Std module to be open by default (like Pervasives is). But there may be a problem (correct me if i'm wrong): if I don't use, say Arg, in my program, the Arg module doesn't appear in the executable. But if it is packed in std.cmo then Std.Arg will be in my executable (as part of Std), as all the other standard modules I don't use. Is that true ? > 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. And can't you pack the new array module in another one, hiding the new Array and letting the standard one visible ? -- Maxence Guesdon ------------------- 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