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 DAA21712; Wed, 21 Jan 2004 03:32:16 +0100 (MET) 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 DAA22475 for ; Wed, 21 Jan 2004 03:32:14 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from eposta.kablonet.com.tr ([62.248.102.66]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id i0L2WCv19560 for ; Wed, 21 Jan 2004 03:32:12 +0100 (MET) Received: (qmail 23744 invoked by uid 0); 21 Jan 2004 02:39:03 -0000 Received: from unknown (HELO 195.174.173.82) (exa@kablonet.com.tr@195.174.173.82) by 0 with SMTP; 21 Jan 2004 02:39:03 -0000 From: Eray Ozkural Reply-To: erayo@cs.bilkent.edu.tr Organization: Bilkent University CS Dept. To: David Brown Subject: Re: [Caml-list] ANNOUNCE: mod_caml 1.0.6 - includes security patch Date: Wed, 21 Jan 2004 04:32:00 +0200 User-Agent: KMail/1.5.94 Cc: Ocaml Mailing List References: <200401210148.20003.exa@kablonet.com.tr> <20040121003455.GA27898@davidb.org> In-Reply-To: <20040121003455.GA27898@davidb.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200401210432.01197.exa@kablonet.com.tr> X-Loop: caml-list@inria.fr X-Spam: no; 0.00; eray:01 ozkural:01 caml-list:01 2004:99 2004:99 eray:01 ozkural:01 haskell's:01 elect:99 erayo:01 bilkent:01 bilkent:01 ankara:01 kde:01 kde:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wednesday 21 January 2004 02:34, David Brown wrote: > On Wed, Jan 21, 2004 at 01:48:19AM +0200, Eray Ozkural wrote: > > Compiler knows which x to use, let and which differ only in syntax! > > Semantics is the same. > > Does it? > > let f a = > let a = a + 1 in > a > where a = a + 2 > > What does this function do? You could argue for any result a, (a+1), > (a+2), or (a+3). The casual definition of the where clause doesn't > specify precedence. Obviously, an implementation would have to chose > one, but there is no clear reason one choice is better than the other. Have a look at Haskell's syntax rules, they work well enough. This is again just syntax, it's not a big deal. If the programmer feels the chosen syntactic rules make some of his code look ambiguous he may elect a) not to use "where" b) use blocks to properly indicate scoping, which is just as valid for complex use of let! -- Eray Ozkural (exa) Comp. Sci. Dept., Bilkent University, Ankara KDE Project: http://www.kde.org www: http://www.cs.bilkent.edu.tr/~erayo Malfunction: http://mp3.com/ariza GPG public key fingerprint: 360C 852F 88B0 A745 F31B EA0F 7C07 AE16 874D 539C ------------------- 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