Linked by Eugenia Loli on Sun 30th Oct 2005 20:01 UTC
.NET (dotGNU too) While demonstrating the rudiments of anonymous methods, Paul Kimmel answers the question "Are anonymous methods just someone being a bit too clever?"
Permalink for comment 53318
To read all comments associated with this story, please click here.
.Net and capturing local variables.
by steveftoth on Sun 30th Oct 2005 22:09 UTC
Member since:

RE: the serverside article, a very good read.

Re anonymous functions and capturing local variables...
Wow that seems like an easy to misunderstand 'feature'. It seems to me that the rules are not well defined on how local variables are captured in to anonymous delegates. Is there a reference? Why do they get promoted to some special semi-real variables instead of something 'simple' that won't get abused. I'm a java person so I'm biased, but I find that the enforcement that local variables cannot migrate to anonymous inner class definitions without being declared final is a good one since it makes debuggin easier, easier to read code and makes it 'more' deterministic rather then his own example where you're not sure what will happen due to thread inconsistincy.

Reply Score: 2