You are viewing a single comment's thread from:
RE: C# Lambda... are you using them wrong?
Just thought, there is also a good side effect of function factories to build closures vs lambda defined inline where used. It gives you explicit control over what is captured by the closure.
Are you a resharper user? Great tool but one thing it does it let you know when the C# compiler pulls in far more to closures than wanted. This actually happens a lot in reality and sometimes the only way to control is re-order the function code.
By using a function to scope and build a closure you gain explicit control over the process by limiting what is in scope in the first place :)