HACKER Q&A
📣 pharmakom

Is Functional Programming the Future?


As new functional languages get made and gain wider appeal (e.g. Elm) and existing mainstream languages move in a function programming direction (e.g. records in Java), it seems that functional programming is ascendant.

But is this hype only in the HN bubble? And will functional programming achieve dominance in a way similar to OOP in the late 90s / early 2000s?


  👤 proc0 Accepted Answer ✓
Probably not. Elements of it have already made it (i.e. React, Redux), but pure FP has a learning difficulty curve that is too steep for enterprise software, meaning most of the apps out there. From my experience, companies don't mind increasing the number of engineers on a project but they almost never like to increase the sophistication of the code.

👤 the__alchemist
I don't think so. Imperative programming is a closer model for how computer registers work. More subjectively, I think imperative code is a better match for how we think about problem solving - ie in the time domain.

I think by relegating time control to a workaround, functional languages aren't a great fit for most problems. The concept of pure functions is elegant, but I don't think it's a realistic model.


👤 slmjkdbtl
I think OOP (especially inheritance) will die and people will generally move toward a more compositional and functional style, but not strictly 100% pure function where possible.

👤 ctenb
It will probably be more prevalent in the future, but functional programming (especially strongly typed) comes with abstractions that are a little more difficult than standard OO patterns, which makes adoption a slow process that relatively few people have the dedication for. Therefore OO isn't going away. However, OO languages will adopt more functional features (because they are super powerful). This in turn wil help the average programmer get used to certain functional patterns, which may help increase the adoption of purely functional languages.

👤 eyelidlessness
The future is already here, it’s just multi-paradigm. FP techniques and language affordances are increasingly common across most high level languages. Newer/newish languages like Rust and Swift emphasize functional approaches.

Anecdotally, this seems to be widely embraced, not just on HN. But dominance? I don’t think that’s likely. I just think the multi-paradigm approach will continue to embrace FP in general.


👤 muzani
I'm personally plateaued on functional programming ability. There's a ton of books written about clean code and architecture in OOP, but no obvious ones on functional.

👤 rytcio
I hope so, OOP is a disaster for performance and causes exponential complexity in code