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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 4C974BBAF for ; Fri, 30 May 2008 09:03:53 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgECAMRDP0jAXQIniGdsb2JhbACSKgEBAQ8gnDA X-IronPort-AV: E=Sophos;i="4.27,565,1204498800"; d="scan'208";a="13246489" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 30 May 2008 09:03:52 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4U73mjs027073 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 30 May 2008 09:03:52 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEAAINDP0jUNQVbo2dsb2JhbACSKgEBAQEBBgcIBxGcLg X-IronPort-AV: E=Sophos;i="4.27,565,1204498800"; d="scan'208";a="12947272" Received: from postbode01.versateladsl.be ([212.53.5.91]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 May 2008 09:03:52 +0200 Received: (qmail 7434 invoked by uid 0); 30 May 2008 07:03:37 -0000 Received: from unknown (HELO poincare.swapping.umh.ac.be) ([83.182.223.34]) (envelope-sender ) by smtp.versateladsl.be (qmail-ldap-1.03) with SMTP for < >; 30 May 2008 07:03:37 -0000 Received: from [127.0.0.1] (helo=localhost ident=trch) by poincare.swapping.umh.ac.be with esmtp (Exim 4.69) (envelope-from ) id 1K1yeN-0001q2-Lu; Fri, 30 May 2008 09:03:43 +0200 Date: Fri, 30 May 2008 09:03:43 +0200 (CEST) Message-Id: <20080530.090343.748551678912443102.Christophe.Troestler+ocaml@umh.ac.be> To: mvanier@cs.caltech.edu Cc: granicz.adam@vnet.hu, caml-list@inria.fr Subject: Re: [Caml-list] syntax question From: Christophe TROESTLER In-Reply-To: <483F54A5.4020808@cs.caltech.edu> References: <483F2CEC.7020701@cs.caltech.edu> <483F54A5.4020808@cs.caltech.edu> X-Face: #2fb%mPx>rRL@4ff~TVgZ"<[:,oL"`TUEGK/[8/qb58~C>jR(x4A+v/n)7BgpEtIph_neoLKJBq0JBY9:}8v|j Organization: University of Mons-Hainaut X-Mailer: Mew version 6.0.51 on Emacs 22.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 483FA6D4.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 christophe:01 troestler:01 christophe:01 troestler:01 ocaml:01 vanier:01 afaik:01 ocaml:01 foo:01 foo:01 curried:01 constructors:01 syntax:01 wrote:01 On Thu, 29 May 2008 18:13:09 -0700, Michael Vanier wrote: > > I realize that this is how it works, but I don't understand why it > should work this way. AFAIK elsewhere in ocaml "int * int" always > refers to a tuple. Similarly, if testme's Foo really took two int > arguments I would expect to be able to create Foos as "Foo 1 2" > instead of "Foo (1, 2)" which looks like Foo takes a single tuple > argument, not two int arguments. I don't see why "int * int" and > "(int * int)" are different things. Curried constructors are available in the revised syntax. But since the original syntax uses ``Foo (1, 2)'' for a constructor of 2 arguments, it is declared ``Foo of int * int'' by analogy with products. Hence the small glitch you noticed (in general that causes no problems however). My 0.02¤, ChriS