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 (09:43)
From: Andreas Rossberg <rossberg@p...>
Subject: Re: [Caml-list] ANNOUNCE: mod_caml 1.0.6 - includes security patch
David Brown wrote:
> 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.

It is not obvious, since there is a another, strictly better choice: the 
grammer could simply give let and where same precedence and disallow 
mixing them without parentheses.

	- Andreas

Andreas Rossberg,

"Computer games don't affect kids; I mean if Pac Man affected us
  as kids, we would all be running around in darkened rooms, munching
  magic pills, and listening to repetitive electronic music."
  - Kristian Wilson, Nintendo Inc.

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