3 ms·
Edit: "Real" is, I suppose, arguable. By that I meant: Java's lambdas don't support mutation of captured variables. Then Haskell doesn't have closures either ;
by danieldk 11y ago
Edit: "Real" is, I suppose, arguable. By that I meant: Java's lambdas don't support mutation of captured variables.
Then Haskell doesn't have closures either ;).
I think the definition of a closure is: a lambda abstraction / anonymous function that uses a free variable in its definition. So, Java's lambdas are real closures.
- WalterGR 11y agoMaybe I'm just biased because I was first introduced to closures by SICP, and so Scheme's take became my personal Platonic Ideal. :)
- deleted 11y ago[deleted]