Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ANNOUNCE: mod_caml 1.0.6 - includes security patch
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eray Ozkural <exa@k...>
Subject: Re: [Caml-list] ANNOUNCE: mod_caml 1.0.6 - includes security patch
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) <erayo@cs.bilkent.edu.tr>
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