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 KAA13054; Sun, 25 Aug 2002 10:36:02 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA13172 for ; Sun, 25 Aug 2002 10:36:01 +0200 (MET DST) Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g7P8a0D11785; Sun, 25 Aug 2002 10:36:01 +0200 (MET DST) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto2.wanadoo.fr (6.5.007) id 3D5392B6005B39AD; Sun, 25 Aug 2002 10:36:00 +0200 Received: from iliana (80.9.106.53) by mel-rta9.wanadoo.fr (6.5.007) id 3D49FFB70083A46C; Sun, 25 Aug 2002 10:36:00 +0200 Received: from luther by iliana with local (Exim 3.35 #1 (Debian)) id 17isqM-0000Bx-00; Sun, 25 Aug 2002 10:33:58 +0200 Date: Sun, 25 Aug 2002 10:33:58 +0200 To: Maxence Guesdon Cc: Dmitry Bely , caml-list@inria.fr Subject: Re: [Caml-list] packing Ocaml standard library into Std "namespace" Message-ID: <20020825083358.GA723@iliana> References: <20020825005507.4ec07867.maxence.guesdon@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020825005507.4ec07867.maxence.guesdon@inria.fr> User-Agent: Mutt/1.4i From: Sven LUTHER Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, Aug 25, 2002 at 12:55:07AM +0200, Maxence Guesdon wrote: > 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). Yes, that would be a good solution. > 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 ? Does the exectuable only contain the used code anyway ? I thought it was so, and if it is not so, then maybe it should. Otherwise, we would need something like strip to remove the unused parts. But really, my impression was that when creating an executable, ocamlc only copies the really used functions over to it, i may be wrong still. Also, we should do this kind of thing for all third party libraries, especially those which have more than one module. Sven Luther ------------------- 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