caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sven LUTHER <luther@dpt-info.u-strasbg.fr>
To: Maxence Guesdon <maxence.guesdon@inria.fr>
Cc: Dmitry Bely <dbely@mail.ru>, caml-list@inria.fr
Subject: Re: [Caml-list] packing Ocaml standard library into Std "namespace"
Date: Sun, 25 Aug 2002 10:33:58 +0200	[thread overview]
Message-ID: <20020825083358.GA723@iliana> (raw)
In-Reply-To: <20020825005507.4ec07867.maxence.guesdon@inria.fr>

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


  reply	other threads:[~2002-08-25  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-24 21:42 Dmitry Bely
2002-08-24 22:55 ` Maxence Guesdon
2002-08-25  8:33   ` Sven LUTHER [this message]
2002-08-25  9:44   ` Dmitry Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020825083358.GA723@iliana \
    --to=luther@dpt-info.u-strasbg.fr \
    --cc=caml-list@inria.fr \
    --cc=dbely@mail.ru \
    --cc=maxence.guesdon@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).