1 f x =
2    let x = x * scale in
3    g x

Hmmm ... just assume that the scope of the x on line 3 (which
 hides the x from the higher level scope is extended from line 3 to
 the beginning part of line 2 (from line start to the equal sign).
 OCAML does it. "Let before" in Clean does it too. Does not sound
 bad to me either. So this sounds to me like weak argument compared
 to disadvantages. There should be something else (I'm missing)
 there too...

Thanks,
   Peter.

Dan Piponi wrote:
On 8/30/07, Peter Hercek <[EMAIL PROTECTED]> wrote:

f x =
   let x = x * scale in
   let x = x + transform in
   g x

Why are you trying to call three different things by the same name 'x'
in one tiny block of code? That's very confusing and makes it hard to
reason equationally about the code.
--
Dan

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to