On Tue, Sep 13, 2011 at 6:02 PM, Ricky Clarkson <[email protected]> wrote: > It's myth-debunking time. It's been so long since I had a good myth-debunk.
I'm not sure what myth I was using that you debunked. :( The example I gave is a full closure where one wouldn't even realize a "lambda" was being used in most cases. In fact, I'm not sure how you would provide a full function to a for comprehension that referenced variables without a full closure. > You can't spot the closure in that Scala code because closures are not > syntax. They are an implementation mechanism provided by compilers. The > term we should have been using all these years is lambdas, which is what > Haskell, Lisp and C# call it. And that's what Java doesn't have; a syntax > for lambdas. It instead has a syntax for anonymous classes, which can be > used to emulate lambdas, and pretty well. I have agreed there is a difference between function literals (lambdas) and what a closure is. I have even ceded that I am being pedantic. The rest of your post seems to just be saying "if we change the definition of closure, then Java has them." -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
