From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 2CD52BB81 for ; Sun, 12 Dec 2004 01:05:54 +0100 (CET) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBC05psa005091 for ; Sun, 12 Dec 2004 01:05:53 +0100 Received: from [192.168.1.200] (ppp203-65.lns1.syd3.internode.on.net [203.122.203.65]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id iBC05g0r025526; Sun, 12 Dec 2004 10:35:43 +1030 (CST) Subject: Re: [Caml-list] How to use Set Datatype From: skaller Reply-To: skaller@users.sourceforge.net To: Brian Hurt Cc: Micha , caml-list@yquem.inria.fr In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1102809942.2611.647.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 12 Dec 2004 11:05:42 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41BB8B5F.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 datatype:01 sourceforge:01 wrote:01 wrote:01 ocaml:01 implicitly:01 struct:01 functor:01 agrees:01 struct:01 bindings:01 glebe:01 ...:98 061:98 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Sun, 2004-12-12 at 08:12, Brian Hurt wrote: > On Fri, 10 Dec 2004, Micha wrote: > Another thing- longtime Ocaml programmers tend to inline their structure > definitions. Why? Because binding implicitly by name is basically bogus? So you write Set.Make(struct let compare=String.compare ... because the name in the functor 'compare' only agrees accidentally. The anonymous struct there seems general, and at least exposes explicitly the bindings. Of course the *implicit* binding in C++ templates (dependent name lookup) is something some of us have learned to hate intensely.. especially when the template calls T().compare .. and our input class spelled it 'Compare' .. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net