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 TAA16208; Tue, 11 May 2004 19:46:58 +0200 (MET DST) 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 TAA13410 for ; Tue, 11 May 2004 19:46:57 +0200 (MET DST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i4BHktSH023793 for ; Tue, 11 May 2004 19:46:56 +0200 Received: (qmail 27831 invoked from network); 11 May 2004 17:46:54 -0000 Received: from shell2.speakeasy.net ([69.17.110.71]) (envelope-sender ) by mail1.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 11 May 2004 17:46:54 -0000 Date: Tue, 11 May 2004 10:46:42 -0700 (PDT) From: brogoff To: briand@aracnet.com cc: caml-list@inria.fr Subject: Re: [Caml-list] duplicate record labels and modules In-Reply-To: <16544.64275.204812.673065@soggy.deldotd.com> Message-ID: References: <16544.24810.112188.634596@soggy.deldotd.com> <68643590-A31D-11D8-A8EF-000393863F70@exomi.com> <16544.64275.204812.673065@soggy.deldotd.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde with ID 40A1118F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brogoff:01 brogoff:01 caml-list:01 2004:99 rtfm:01 faq:01 faq:01 kludgy:01 kludge:01 ocaml's:01 principled:01 reconcile:01 ocaml:01 caml:01 speakeasy:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 11 May 2004 briand@aracnet.com wrote: > That's useful. I need to read the chapter on language extensions more > closely. Also, here's the requisite RTFM (I mean that F in the nicest possible way ;) http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html#labels_surcharge > Ville-Pertti> Alternately, assuming the modules are your own, you > Ville-Pertti> can name your record fields so that opening both > Ville-Pertti> modules doesn't cause conflicts (e.g. using a short > Ville-Pertti> prefix). > > That's very kludgy, isn't it ? IMO, it's inconvenient, and a drawback to the language, but not a kludge, or even a mistake. I reserve that for the undefined order of evaluation :-). Oh well, you didn't expect paradise, did you? > I'm assuming the right way is to use modules, which is what started this > whole exercise for me. If you must share field names in the same module, your only alternative is to use the OO part of Ocaml. That's unfortunate, because I think objects are a bit heavyweight for things like points and segments in a computational geometry program. OTOH, Ocaml's object system is quite powerful and principled (and sometimes complex and unintuitive!) compared to lesser languages like C++ and Java. I often think a class system like CLOS or Dylan's would be more to my liking, but hard to reconcile with ststic typing and modules. -- Brian ------------------- 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