From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5F946BC0A for ; Wed, 14 Feb 2007 20:12:37 +0100 (CET) Received: from sigma957.cis.mcmaster.ca (sigma957.CIS.mcmaster.ca [130.113.64.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1EJCaoG023434 for ; Wed, 14 Feb 2007 20:12:37 +0100 Received: from Gorash7.UTS.McMaster.CA (Gorash7.UTS.mcmaster.ca [130.113.196.61]) by sigma957.cis.mcmaster.ca (8.13.7/8.13.7) with ESMTP id l1EJCM5u023639; Wed, 14 Feb 2007 14:12:32 -0500 (EST) Received: from cgpsrv2.cis.mcmaster.ca (univmail.CIS.mcmaster.ca [130.113.64.46]) by Gorash7.UTS.McMaster.CA (8.13.7/8.13.7) with ESMTP id l1EJBsax015569; Wed, 14 Feb 2007 14:11:54 -0500 Received: from [74.109.166.109] (account carette@univmail.cis.mcmaster.ca HELO [192.168.1.101]) by cgpsrv2.cis.mcmaster.ca (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 162231241; Wed, 14 Feb 2007 14:11:54 -0500 Message-ID: <45D35EFF.1000901@mcmaster.ca> Date: Wed, 14 Feb 2007 14:11:59 -0500 From: Jacques Carette Organization: McMaster University User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Cc: Gerd Stolpmann Subject: Re: [Caml-list] Patterns that evaluate References: <45D23608.4030104@mcmaster.ca> <200702132207.33793.jon@ffconsultancy.com> <45D352F2.3080003@gmail.com> <1171479313.24335.33.camel@localhost.localdomain> In-Reply-To: <1171479313.24335.33.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version-Mac: 4.7.1.128075, Antispam-Engine: 2.4.0.264935, Antispam-Data: 2007.2.14.104933 X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' X-Miltered: at concorde with ID 45D35F24.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; gerd:01 stolpmann:01 syntax:01 semantics:01 o'caml:01 semantics:01 equality:01 equality:01 wrote:01 caml-list:01 matched:01 define:01 mcmaster:02 predefined:03 jacques:03 Gerd Stolpmann wrote: > Before discussing syntax it is more important to > define the semantics of such patterns. I mean we have already three > predefined kinds of equality in O'Caml: > > - ( == ) > - ( = ) > - (fun x y -> compare x y = 0) > > I admit I do not prefer any one of them. So which equality should be > used to test whether the variable is equal to the matched part of the > value? > I would definitely favour structural equality, since that meshes well with pattern-matching's semantics. Anything else would seem hard to justify, but that's just my opinion. Jacques