caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: Alessandro Baretta <alex@baretta.com>, Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] camlimages vs. labltk
Date: Thu, 27 Mar 2003 11:46:00 -0800	[thread overview]
Message-ID: <4.3.2.7.2.20030327113554.0369d060@localhost> (raw)
In-Reply-To: <3E8216B0.2070206@baretta.com>


>Do you see what the problems are with the module system?

Okay, let me restate your point and you can tell me if I got it.  You're 
saying the module system is bad for namespacing because it has the semantic 
of initializing all of its values without necessarily being referenced by 
the main program.  In other words, if I link in Foo, then Foo.myval has to 
be initialized or else the semantics of the module system are broken (side 
effects won't take place, etc.).  So, you can't use pack because pack 
implies a single large module, and the semantics above say you have to link 
and run all of the submodules in order for it to be a "real ocaml 
module".  And, there's no semantic for having some submodules not linked 
in, nor any way to specify that.  Right?

By contrast, cma libraries are different, in that the modules in them 
aren't linked unless they're referenced, right?  So, there is some 
precedent and process for demand based linking (as opposed to always 
linking everything on the link line).

Assuming we're on the same page about all of the above, do you think the 
syntax of the module system should or should not be overloaded for namespaces?

It seems like there are a couple different options:

1.  relax the semantics of module inclusion/initialization so that -pack 
can simultaneously provide the nested module syntax of Package.Foo but it 
doesn't have to link all of the submodules, like a cma

2.  define a new namespace system and syntax (or reuse the module syntax, 
not sure what the issues are there)

Are there any other options?  Did I get all of that right?

I agree that if the module semantics make it so that pack must link all 
submodules and run all initialization then it's too heavyweight and it 
either needs to be changed or there needs to be a new system.

Chris


-------------------
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


  parent reply	other threads:[~2003-03-27 19: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
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 [this message]
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=4.3.2.7.2.20030327113554.0369d060@localhost \
    --to=checker@d6.com \
    --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).