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 LAA28815; Fri, 23 Aug 2002 11:24:12 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA28877 for ; Fri, 23 Aug 2002 11:24:12 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g7N9O5v22643; Fri, 23 Aug 2002 11:24:05 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA28780; Fri, 23 Aug 2002 11:24:04 +0200 (MET DST) Date: Fri, 23 Aug 2002 11:24:04 +0200 From: Xavier Leroy To: Tim Freeman Cc: caml-list@inria.fr Subject: Re: [Caml-list] Why are type functions postfix? Message-ID: <20020823112404.C28346@pauillac.inria.fr> References: <20020812190521.587CF7F66@lobus.fungible.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <20020812190521.587CF7F66@lobus.fungible.com>; from tim@fungible.com on Mon, Aug 12, 2002 at 12:02:09PM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > In OCAML and other ML dialects I've used, you say: > > let x: int ref = ref 3 > > Is there any reason that type functions like the first "ref" are > postfix, unlike function application like the second "ref" that is > prefix? I think it's mostly historical: the original LCF ML used the postfix syntax, and this syntax was kept in SML as well as in Caml. When teaching this, I use to crack a joke that this syntax reflects the british and american roots of the designers of ML: English lets you say "an integer reference" instead of "a reference to an integer", while, say, French would only allow the latter word ordering ("une référence entière" or "une référence vers un entier"). But this folk explanation doesn't really hold: while also designed by brits and americans, Haskell uses the prefix syntax for type operators... - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners