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 UAA20172; Thu, 27 Mar 2003 20:50:51 +0100 (MET) 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 UAA20089 for ; Thu, 27 Mar 2003 20:50:49 +0100 (MET) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h2RJom506110 for ; Thu, 27 Mar 2003 20:50:49 +0100 (MET) Received: (qmail 75004 invoked from network); 27 Mar 2003 19:50:47 -0000 Received: from arda.pair.com (HELO compaqreview.d6.com) (209.68.1.133) by relay.pair.com with SMTP; 27 Mar 2003 19:50:47 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20030327113554.0369d060@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Thu, 27 Mar 2003 11:46:00 -0800 To: Alessandro Baretta , Ocaml From: Chris Hecker Subject: Re: [Caml-list] camlimages vs. labltk In-Reply-To: <3E8216B0.2070206@baretta.com> References: <3E818E08.2000505@baretta.com> <3E81640C.40009@baretta.com> <20030326083345.GA2985@iliana> <3E816C13.7040507@baretta.com> <20030326105006.GA3891@iliana> <3E818E08.2000505@baretta.com> <4.3.2.7.2.20030326110515.035919b0@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam: no; 0.00; hecker:01 checker:01 caml-list:01 camlimages:01 labltk:01 restate:01 initializing:01 foo:01 myval:01 initialized:01 submodules:01 namespaces:01 -pack:01 reuse:01 linked:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >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