Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-01-21 (02:32)
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) <>
Comp. Sci. Dept., Bilkent University, Ankara  KDE Project:
www:  Malfunction:
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: