DEV Community

Discussion on: Why isn't Functional Programming the Norm?

Collapse
 
aminnairi profile image
Amin • Edited

I gave my students an introductory challenge to one of my courses in JavaScript which was to code the split method from scratch (without existing methods). Just for the sake of curiosity I did it in imperative, declarative and functional (recursive). JavaScript performances for the functional one were terrible. And I'm so sad to say that because I am a functional enthusiast. It is great that JavaScript tries to be a multi paradigm language but sometimes it is not for the best. Of course I'm talking about JavaScript here because it is my main language but there are some others that try to follow that path as well.

Collapse
 
allanmacgregor profile image
Allan MacGregor 🇨🇦

My main takeaway here is that just because the language can allow you to use a functional approach it doesn't necessarily mean it is well suited for that type of paradigm.

One of the reasons I have fell in love with elixir so much, is that seems just right in terms of performance, developer usability/happiness and size of the community.