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=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C125FBC69 for ; Tue, 17 Jul 2007 22:15:28 +0200 (CEST) Received: from smtp.janestcapital.com (www.janestcapital.com [66.155.124.107]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6HKFRb2031922 for ; Tue, 17 Jul 2007 22:15:28 +0200 Received: from [172.25.129.161] [38.96.172.125] by janestcapital.com with ESMTP (SMTPD-9.10) id A3730228; Tue, 17 Jul 2007 16:15:47 -0400 Message-ID: <469D235E.9000008@janestcapital.com> Date: Tue, 17 Jul 2007 16:15:26 -0400 From: Brian Hurt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam Steingold Cc: caml-list@inria.fr Subject: Re: [Caml-list] List.cons and "::" References: <469D2055.5080408@gnu.org> In-Reply-To: <469D2055.5080408@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 469D235F.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; hash:01 syntax:01 infix:01 compiler:01 wrote:01 caml-list:01 overridden:02 redefine:03 override:03 override:03 pattern:04 pattern:04 cons:04 cons:04 message-----:05 Sam Steingold wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >Why is :: a syntax, not an infix version of List.cons >(which for some reason is missing)? >thanks. > > So it can be used in pattern matching. Things used in pattern matching the compiler has to know about, and thus the user can't override. Things not used in pattern matching can be overridden. So you can redefine + if you wanted to. I wouldn't recommend it, but you could. :: and , you can't override. Brian