Fairly soon I’m going to write a blog post comparing the different proposals under consideration for Java 7 when it comes to closures. I thought it would be worth writing some background material on it first though, so I’ve put an article on the C# in Depth site.
I’m not entirely comfortable that I’ve captured why they’re important, but the article can mature over time like a good wine. The idea is to counter the Blub Paradox (which I hadn’t come across before, but I agree with completely – it’s part of the effect I believe Steve McConnell was fighting against when talking about programming in a language).
3 thoughts on “The Beauty of Closures”
I write 2 articles on functional features of C#2:
It hasn’t been updated for C#3 lambda but I checked that the compiler works the same as for anonymous methods.
Re the Blub Paradox, I suspect I am guilt of this re F#; I must try to find time to step back and appreciate the *intent* of the language, rather than thinking “how do I do [insert C# thinking] here?”
That’s a very nice “Closures in a Nutshell” article. Well done! I’ll link to this post as a reference in future discussions.