Note that for non-recursive lets

  let' x1 = e1
       x2 = e2

is sequential and *not* the same as the parallel

  let' (x1, x2) = (e1, e2)

The first is

  (\ x1 -> (\x2 -> ...) e2) e1

and the second is

  (\ (x1,x2) -> ...) (e1, e2)

On 11.07.2013 13:36, Doug McIlroy wrote:
By analogy to ML, which has "let" and "let rec", where the latter
corresponds to Haskell's "let", one is led to "let nonrec". I
would definitely not like "shadow", for it means that new
variable does NOT cast a shadow on its definining expression.

I fear also that "let nonrec" by any name would introduce another
attractive nuisance, just as insidious as the one it is intended
to correct. For example
     x = ...
     let nonrec { x = someFunction x
                  xsq = x^2} in ...
won't do what was probably intended. In my own code, this idiom
is more likely than the one that sparked the discussion.


Haskell-Cafe mailing list

Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

Haskell-Cafe mailing list

Reply via email to