4 ms·
actually, this IS the point of learning FP. it's a different way of thinking about programming and it offers you a new way (often a more elegant) of doing thing
by CLPadvocate 6y ago
actually, this IS the point of learning FP. it's a different way of thinking about programming and it offers you a new way (often a more elegant) of doing things.
it's usually worth the effort. writing code in a functional way (even without a functional programming language) simplifies testing, often improves program stability and robustness. the more side-effect-free or pure blocks you have in your code, the easier you can build a composable or a concurrent program. basically, most of the principles of good software development (SOLID, DRY, KISS, ...) are native to FP.
- gjvc 6y agoI started watching the SICP video series on YouTube last year. Just the substitution model exemplified in the Scheme programs in the first few lectures has had a big effect on how I write Python for the $DAYJOB. Probably the most fascinating thing to me about programming is being able to learn a new approach and apply it in different languages or contexts. Note to OP -- watch the SICP video series on YouTube here https://www.youtube.com/playlist?list=PLB63C06FAF154F047 https://www.youtube.com/playlist?list=PLB63C06FAF154F047. Get the book and work at it. It's great.
- CLPadvocate 6y agoit's a great book and the video series is also very good. definitely a good start for FP and also for software engineering in general. coming from a C/Java background, my earlier Python code looks absolutely like a typical imperative/OOP mixture and now every time I look at it I see parts that can be rewritten in a much cleaner, simpler, FP-like style. it's really one of the paradigms that changes the mind in some way.
- mraza007 6y agoHey thanks for sharing that link I’ll definitely check it out