caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sven Luther <luther@dpt-info.u-strasbg.fr>
To: Alessandro Baretta <alex@baretta.com>
Cc: Sven Luther <luther@dpt-info.u-strasbg.fr>, Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] camlimages vs. labltk
Date: Wed, 26 Mar 2003 11:50:06 +0100	[thread overview]
Message-ID: <20030326105006.GA3891@iliana> (raw)
In-Reply-To: <3E816C13.7040507@baretta.com>

On Wed, Mar 26, 2003 at 10:00:03AM +0100, Alessandro Baretta wrote:
> 
> 
> Sven Luther wrote:
> >On Wed, Mar 26, 2003 at 09:25:48AM +0100, Alessandro Baretta wrote:
> >
> >
> >There is already the -pack option, and the right thing to solve this
> >problem would be to build all libraries to make usage of it (if
> >possible). So you would have a CamlImage.Image module and a Labltk.Image
> >module, which work pretty well.
> >
> >Now, library writters just need to modify their build system to take
> >advantage of it, starting by the INRIA released libraries, especially
> >the ones provided by the ocaml tarball directly like labltk.
> 
> Sven, someone on this list wisely pointed out that you buy 
> nothing by telling someone else "You don't need that 
> feature". We do need namespaces. It might not be paramount: 

And the module system offers it. The problem you have is not about
namespace, but because the current namespace solution has a few
technical problems that need to be solved. The module system provides a
theoretically and well proved way of doing namespace management, and you
want to put it aside for a java-inspired quick hack because of
technicalities ?

> I'm pretty sure there is something more important to be done 
> at Inria. But, please, don't tell me that -pack will cure 
> cancer, promote democracy, establish universal peace, and 
> make my teeth look whiter. Packing does not allow 

It is the right solution for the current problem. The problem is that
you want to solve the namespace issue, and the correct way of doing this
is by moving the modules of a library to be submodules of the library
module or something such. This can be achieved best with the -pack
option right now, even if there are a few problems with it.

> factorizing your code--bytecode, actually--in small reusable 
> units. One big .cmo is not as flexible as a .cma. I simply 
> might not want to link all of a library: what if it's 
> modules contain side-effects?

Well, if you look at the C libraries, they are either static libraries,
where you get ride of the cruft with strip, or dynamically loaded shared
libraries. I don't think there is a strip equivalent, for ocaml (be it
bytecode or native code, not sure about native code though) but the
current inclusion granularity is at the .cmo level. This may be changed
in the future though. As for dynamically loaded, shared ocaml code, this
is also not yet available, but is also a requested feature, which would
make the above stripping unnecessary, i think.

So, the problem is not so much that we need a namespace solution, we
clearly have one already, but that we need smaller granularity in code
inclusion in .cmo or .cmx, or a strip utility or functionality which can
be called by ocamlc at link time and/or true dynamically linked and
shared libraries. Both of these things have often be requested, but
cause some problems, if i understood right what the ocaml team has to
say about it.

As for side-effects, i didn't really think about that, but i guess that
you could easily implement the modules so that the side effect do happen
when you call a module initialization function or something such. I
don't think it really is good practice to use toplevel global side
effect for library code anyway.

> So -pack is good, but 
> namespaces are still a necessary feature to Ocaml as to any 
> industrial level programming language.

No, the namespace feature is already there, altough not much used in
reality, the problems are elsewhere.

Friendly,

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:[~2003-03-26 10:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-25 19:33 Shivkumar Chandrasekaran
2003-03-26  8:25 ` Alessandro Baretta
2003-03-26  8:33   ` Sven Luther
2003-03-26  9:00     ` Alessandro Baretta
2003-03-26 10:50       ` Sven Luther [this message]
2003-03-26 11:24         ` Alessandro Baretta
2003-03-26 11:38           ` Sven Luther
2003-03-26 19:08             ` Chris Hecker
2003-03-26 21:08               ` Alessandro Baretta
2003-03-27 17:23                 ` David Brown
2003-03-27 19:46                 ` Chris Hecker
2003-03-28  5:33                   ` Alessandro Baretta
2003-03-28  5:35                     ` David Brown
2003-03-28 14:10                   ` Damien Doligez
2003-03-28 15:00                     ` Sven Luther
2003-03-30 10:06                       ` Damien Doligez
2003-03-30 10:38                         ` Sven Luther
2003-04-01 14:14                           ` [Caml-list] naming conflicts (was: camlimages vs. labltk) Damien Doligez
2003-04-01 15:05                             ` Benjamin C. Pierce
2003-04-01 19:51                             ` Chris Hecker
2003-04-08 10:33                               ` Damien Doligez
2003-03-31  1:21                         ` [Caml-list] camlimages vs. labltk Chris Hecker
2003-03-30  9:26                     ` Alessandro Baretta
2003-03-26 18:49     ` Shivkumar Chandrasekaran
2003-03-26 10:48   ` Stefano Zacchiroli
2003-03-26 10:55     ` Sven Luther
2003-03-26 14:10       ` Stefano Zacchiroli

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=20030326105006.GA3891@iliana \
    --to=luther@dpt-info.u-strasbg.fr \
    --cc=alex@baretta.com \
    --cc=caml-list@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).