News for hackers. Stuff that matters.
Re:A lambda is not necessarily a closure by Ono-Sendai on Tuesday February 09, 2016 @07:27AM (#11064801)
It's probably because, in an implementation of a staticly typed language, you have to treat all functions being passed around as closures. E.g. the type of a lambda expression needs to be one thing, and that is a closure. Whether or not any variables are actually closed over is irrelevant.
Re:A lambda is not necessarily a closure by nailer on Tuesday February 09, 2016 @10:18AM (#11065801)
Couldn't the type of a passed around function simply be 'function'? Why does it have to be inaccurate?
Re:A lambda is not necessarily a closure by Ono-Sendai on Tuesday February 09, 2016 @12:17PM (#11066879)
Well a function may in general have closed over arguments. Therefore it needs to be a closure. (If you have lexical scoping that is)