r/programming • • Aug 05 '19

Why Declarative Coding Makes You a Better Programmer

http://minborgsjavapot.blogspot.com/2019/08/why-declarative-coding-makes-you-better.html
0 Upvotes

15 comments sorted by

View all comments

2

u/masterofmisc Aug 05 '19

If you are using C# he is basically replace all your imperative for loops with Linq queries where possible!

... which is good advice that you cant grumble with.

Lambda functions such as map (Select in Linq), Where, Filter etc are common place now in languages like Python, C#, Java & JavaScript, etc.

2

u/scottmcmrust Aug 05 '19

Resharper can do this automatically. Using that feature is often a good demonstration of why that advice is not necessarily good advice, and I tend to Ctrl-Z after trying it.