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 UAA18189; Tue, 11 May 2004 20:15:23 +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 UAA18487 for ; Tue, 11 May 2004 20:15:20 +0200 (MET DST) From: briand@aracnet.com Received: from citrine.spiritone.com (citrine.spiritone.com [216.99.193.133]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i4BIFISH027211 for ; Tue, 11 May 2004 20:15:19 +0200 Received: from soggy.deldotd.com (216-99-206-32.cust.aracnet.com [216.99.206.32]) by citrine.spiritone.com (8.12.10/8.12.8) with ESMTP id i4BIFIOt030222; Tue, 11 May 2004 11:15:18 -0700 Received: from briand by soggy.deldotd.com with local (Exim 3.36 #1 (Debian)) id 1BNbmf-0000hZ-00; Tue, 11 May 2004 11:15:17 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16545.6197.680705.27513@soggy.deldotd.com> Date: Tue, 11 May 2004 11:15:17 -0700 To: brogoff Cc: caml-list@inria.fr Subject: Re: [Caml-list] duplicate record labels and modules In-Reply-To: References: <16544.24810.112188.634596@soggy.deldotd.com> <68643590-A31D-11D8-A8EF-000393863F70@exomi.com> <16544.64275.204812.673065@soggy.deldotd.com> X-Mailer: VM 6.92 under Emacs 21.2.1 X-Miltered: at concorde with ID 40A11836.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 brogoff:01 brogoff: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 >>>>> "brogoff" == brogoff writes: brogoff> On Tue, 11 May 2004 briand@aracnet.com wrote: >> That's useful. I need to read the chapter on language extensions >> more closely. brogoff> Also, here's the requisite RTFM (I mean that F in the brogoff> nicest possible way ;) brogoff> http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html#labels_surcharge I Just found it. It should have occurred to me that this subject would be an FAQ. However, my original question was more about the syntax of making using modules to separate the field name less typing-ful :-) 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 ? brogoff> IMO, it's inconvenient, and a drawback to the language, but brogoff> not a kludge, or even a mistake. I reserve that for the brogoff> undefined order of evaluation :-). Oh well, you didn't brogoff> expect paradise, did you? >> I'm assuming the right way is to use modules, which is what >> started this whole exercise for me. brogoff> If you must share field names in the same module, your only brogoff> alternative is to use the OO part of Ocaml. That's brogoff> unfortunate, because I think objects are a bit heavyweight brogoff> for things like points and segments in a computational brogoff> geometry program. OTOH, Ocaml's object system is quite brogoff> powerful and principled (and sometimes complex and brogoff> unintuitive!) compared to lesser languages like C++ and brogoff> Java. I often think a class system like CLOS or Dylan's brogoff> would be more to my liking, but hard to reconcile with brogoff> ststic typing and modules. I do _not_ need to use the same field name in the same module. So using modules is the right way and what I will do. For my current application objects are, as you say, too heavyweight. 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