You are viewing a single comment's thread from:

RE: C# Lambda... are you using them wrong?

in #programming9 years ago

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 :)

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.094
BTC 63506.33
ETH 1774.56
USDT 1.00
SBD 0.39