You are viewing a single comment's thread from:

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

in #programming9 years ago (edited)

Not really. Take the following

var wanted = things.Where(thing => IsWanted(thing)); 
var wanted = things.Where(IsWanted); 

With a collection 1000 elements long the first one will result in 1000 extra function calls because of the pointless wrapper. So more stack manipulation etc.

So just using the method group saves a lot of work and is cleaner.

When you get to using partial application in C# then you are right, it does become about sugar, C# does not curry at a language level.

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.093
BTC 62934.78
ETH 1756.13
USDT 1.00
SBD 0.39