5 ms·
It should be used with caution and not abused, you're right of course. But when I use LINQ's GroupBy, SelectMany etc. I know they've been tested millions of ti
by V-2 13y ago
It should be used with caution and not abused, you're right of course.
But when I use LINQ's GroupBy, SelectMany etc. I know they've been tested millions of times before.
The same cannot be said about somebody's "hand-made" algorithm, accomplishing the same result with foreach loops, breaks etc. like you would in good ol' Java.
So it's not just a matter of being imperative, long-winded or ugly.
You can also break LINQ expressions down into a series of simplier ones: deferred evaluation is a bliss here!
Or - thanks to the way it works, extension methods, anonymous methods etc. - simplify it by creating your own LINQ-like functionality, such as - say - Batch (not part of the standard Linq library)