DEV Community

Panda Quests
Panda Quests

Posted on

Why isn't functional programming the norm?

Top comments (4)

Collapse
 
eljayadobe profile image
Eljay-Adobe

It takes time for an up-and-coming programming paradigm to spread. And the language (as a tool) has to be practical, in that is useful to solving the problem at hand superior to the tried-and-true tools that are entrenched.

I foresee a future where FP languages and DSL are dominant. But MP and OO and SP languages will still be extent, rather than extinct. And there is also a strong possibility that the popular languages of today which are still growing and evolving, say C++, will incorporate FP into the core language to make it a viable option in the FP space against other FP languages.

Within the FP community, there's a bit of contention regarding "pure" and "impure" languages. F# is an "impure" FP language, but I prefer to consider it a pragmatic FP language.

There's also a bit of an identity crisis as to what is and isn't part-and-parcel for being a functional programming language. For example, wikipedia categorizes a lot of languages as being "functional programming languages" which are marginally (at best!) for being seriously consider FP. I consider that the kind of misinformation that can muddy the waters. (I've seen the same problem with what is/isn't "unit testing". The terminology has been used with so many different conflicting semantics that it becomes a communication impediment when discussing "unit testing".)

Collapse
 
theonlybeardedbeast profile image
TheOnlyBeardedBeast

I hope there will be no norm anymore, I mean I prefer OOP, but it is hell to see everyone crying about the FP/OOP. I do both, and I am happy to know how to use both. Everyone should use what helps him/her to achieve the the set goal.

Collapse
 
webbureaucrat profile image
webbureaucrat

A lot of it is legacy, I think. It used to be you didn't have a choice of whether or not you wanted to put up with things like mutation bugs because you didn't have the luxury of creating a new whole new state every time you needed one.

There's also some economics at work--namely the principle-agent problem. Developers (the principle users of programming languages) don't often get to just tell their employers what they'd like the stack to be. So people with business degrees or engineering managers who don't write much code any more make decisions (as agents) to invest in tech that's popular instead of good.

In the long run, I have faith that FP will be the norm as more devs gravitate to FP jobs, but that's a very slow process.

Collapse
 
icyjoseph profile image
Joseph

This talk got you covered youtu.be/QyJZzq0v7Z4