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 EAA11326; Tue, 10 Apr 2001 04:53:37 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA11316 for ; Tue, 10 Apr 2001 04:53:36 +0200 (MET DST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f3A2rYf25535; Tue, 10 Apr 2001 04:53:35 +0200 (MET DST) Received: from localhost (patrick@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f3A2s3u63622; Mon, 9 Apr 2001 22:54:03 -0400 (EDT) (envelope-from patrick@watson.org) Date: Mon, 9 Apr 2001 22:54:03 -0400 (EDT) From: Patrick M Doane To: Pierre Weis cc: caml-list@inria.fr Subject: Re: [Caml-list] variant with tuple arg in pattern match? In-Reply-To: <200104081945.VAA09757@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, 8 Apr 2001, Pierre Weis wrote: > I would suggest the other way round: as we already did for functions, > we should prefer the curried syntax for constructors. > > I suggest to explicitely annotate the constructor definitions as in: > > type t = > | C : int -> int -> t I really like this! You mentioned in later e-mails that this would leave pattern matching unaffected. I assume it should also be possible to consider the constructor as a higher-order function usable in any location that a variable is currently allowed. I think it is good to have these syntax discussions from time to time. Obviously it should not be the main focus of attention, but syntax really matters for the first impressions a user has with a new programming language. Patrick ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr