Re: Programming Peter Principle
> Obviously, YMMV but LINQ, the TPL, async/await, yield return (etc.) all make the older alternatives look awkward.)
Perhaps, but it can also hide a bunch of inefficient loops (thinking linq).
I saw the following line a month back
Var myshashset = new hashset<int>();
// Put some numbers in it
if (myhashset.Any(a => a == 5))
DoSomething;
Put a million numbers into your hashset if you want to know why that is such a bad idea.
Another one I saw was two consecutive aggregate functions, which I had to point out to the author that they were iterating their whole dataset twice.
The others though are brilliant.