tags:

views:

128

answers:

2

Is that me, or is everyone practicing putting => everywhere it can go?

I guess that I risk myself voted down to oblivion, but it's my opinion that lambdas have their place somewhere, and not everywhere.

So, to the real question - where to use lambda and where NOT to use it?

+2  A: 

It's all about readability and personal style, if it makes sense to you, use them, if not, don't. Lambdas are a tool, that can be used or not used with no serious consequences.

Matthew Vines
+4  A: 

My rule of thumb:

  • Use lambdas when they make your code more readable, more understandable, or simpler.

  • Avoid them when they make your code more complex.

Reed Copsey