3 ms·
Agreed. That's how I would write it in a professional codebase. I added it to show the transformation from separate functions -> LINQ one-liner. Cheers!
by sieep 1y ago
Agreed. That's how I would write it in a professional codebase. I added it to show the transformation from separate functions -> LINQ one-liner. Cheers!
- Etheryte 1y agoHaving things on one line is not an upside. Just think of all the Bash one-liners that are write once edit never. Doubly so in what's essentially a tutorial.
- sieep 1y agoMy intention wasn’t to promote one-liners as a best practice, but to illustrate how declarative style can evolve from imperative code. In production, I agree that clarity should come first.