The Beauty of Closures

csharp , java , closures , delegates , lambda
This is a comment thread discussing The Beauty of Closures
  • 12 years ago
    Dear Jon, Thanks for taking the time to writing this great introduction to closures in C# and Java. By the way, have you had the chance to look at the [Umbrella project](http://www.codeplex.com/umbrella) (via CodePlex)? It's a .NET library that offers many helper/utility methods to easily work around various objects, pretty much using the same approach as your article. Though the code isn't highly documented, it's written explicitly enough to understand it. It's one of those libraries that should belong in everyone's lib folder ;) Brian www.BrianOnSoftware.com
  • 11 years ago

    Thanks Jon for a clear well-written article. I reached this article after downloading Ruby, and wanted to brush up on closures and some other supported language features. I appreciate the full code examples- many times authors leave out details, which can make the reader feel as if he or she is "missing something". Best Regards, Mark

  • 11 years ago

    Hi !

    I think, it's even more complicate in C#. Im using this usual trick [declare local variable and assign it's the loops var] while I am creating Tasks ..... The called method got other values on each run ... ! Really strange! I feel, it would be better tow write two more clean understandable lines of code - like in your java-sample - then ever deal with lamba's [too abstract for me and I am getting completely unexpected results, each time, I try to use them] !!

    br--mabra

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Every language has an optimization operator. In C++ that operator is ‘//’”