DEV Community

Discussion on: 3 Things I Learned In 1 Year Working with Functional Programming

Collapse
 
wulymammoth profile image
David

Interesting post, Vinicius. I was a heavy RoR and JS user prior to Elixir, but I didn't find it too hard to switch -- but this was not the case for many in the same organization where I started with Elixir. I think your analogy is right. I was lucky enough to have understood the subtle difference between "declarative" versus "imperative" code. But what also helped was that I was already consistently using the common declarative methods afforded to us by both Ruby and JavaScript -- fold, reduce, inject, each, forEach. So that was very very familiar. Reduce/fold is something I reach for constantly. It's a familiar word in the React world ala reducers

However, one thing that I'll note with regard to your post is that a lot of the code written within organizations is not even OOP -- it's just procedural and imperative code which appears to be the first Ruby example that you had shared. Are you familiar with Sandi Metz? She's definitely worth checking out for what I've come to understand as pragmatic OOP (Smalltalk-influenced).