loading...

Discussion on: OOP vs Functional Programming

Collapse
leob profile image
leob

Rust is very interesting, I think among the "popular" languages it comes closest to being an "FP light" language. I've studied it a bit and it reminded me a lot of Haskell with its algebraic data types.

Of the major "popular" languages I guess that Javascript has the most FP potential.

However if I'm not mistaken you could say that Go is an outlier, the fact that it doesn't support generics mean that map/filter/reduce are as good as impossible, you're more or less forced to program everything with procedural loops.

But for the rest, if you look at the top 20 languages what surprises me is how 'conservative' it is, people stick to what they know, ancient C and C++ are still high up there, really innovative and ground-breaking languages aren't making it into the top 20.

I know that some FP features are making it into most popular languages, Javascript is a language with a good deal of that, however only a pure FP language will force you to think with a genuine FP mindset, barring that people will adopt some of the map/filter/reduce style but that's about it.

In other words, regarding FP breaking into the "main stream" I'm not holding my breath.