Richard A. O'Keefe wrote:
- what you get is a reference to a variable (as you do in Scheme)
but loop variables really are variables, not names for values,
so lambdas created in different iterations of the same loop point
so the same loop variable, and do not remember the value it had
when they were created. The proposal explains how to work around this.
This one trips everyone up in Javascript.
I think I'm of the opinion that variable capture from lambda formation
should always be by value. However you can certainly make an argument
that that's inconsistent in a language which generally has
mutation/reference semantics. Whichever choice you make, though,
document it loudly I predict it will be a source of confusion.
Jules
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe