News for hackers. Stuff that matters.
Re:Introducing Closure Tools by blasdel on Thursday November 05, 2009 @08:55PM (#925271)
Haskell does not semantically have closures at all, because functions have only their arguments -- no scope to close over.

Lexically, there's where clauses to scope function definitions, but that gets desugared very early, and is really not the same thing at all anyway (the name binding is completely static).

Re:Introducing Closure Tools by distortion on Friday November 06, 2009 @08:35AM (#925925)
Of course Haskell has closures, there's always a scope to close over:

f x = (\y -> x + y)

Re:Introducing Closure Tools by blasdel on Friday November 06, 2009 @04:18PM (#926952)
That's still just high-level lexical sugar - the 'scope' is not captured, just rewritten. After desugaring, there is no scope left, even lexically.

It's completely different from a 'closure' in a language that has variables.