3 ms·
> removing the braces If I have learned anything over the years, it's that removing the braces anywhere is the introduction of a bug during a rewrite waiting t
by vanderZwan 11y ago
> removing the braces
If I have learned anything over the years, it's that removing the braces anywhere is the introduction of a bug during a rewrite waiting to happen.
- rubber_duck 11y agoIt really works without any issues in C# from my experience. Statemends like : list.Where(e => e.Property == ExpectedValue).Select(e => e.Property) is much cleaner than something like : list.Where([](auto e) { return e.Property == ExpectedValue; }).Select([](auto e) { return e.Property; }); Braces and capture declaration adds 0 value here and it's ~80% of the use cases I see for lambdas.