I just read an article (https://dzone.com/articles/why-we-need-lambda-expressions) which was supposed to explain to me why lambda expressions are a good thing. But while reading I became even more convinced that they are evil and should be avoided.
Big projects have a lot of code. It is worked on by many people. For big projects it is crucial that code is easy to understand. In vast majority of cases readability of code trumps performance. (Agree or not?) And readability is exactly what Lambda expressions seem to take away. Every time you run into a "beautiful" one-liner written by some aspiring genius you have to stop for a couple of minutes. It takes time to figure out what gets executed here and what was the author's intention. I feel like people write these one-liners because they want to feel smart. And that's the real reason.
What do you think?
submitted by /u/santos929
[link] [comments]
from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! http://bit.ly/2GvVM0F