DEV Community

Discussion on: Functional Programming Not The Next Great Software Programming Paradigm

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

The only thing about this article I can agree with is the sentiment that functional programming is not the silver bullet paradigm. When it comes to the lowest level and highest performing code, imperative styles have an edge. (And by the way, it so happens that there exist hybrid languages which do both FP and OO, like F#.)

All the other assertions and implications of this article are hilarious. FP is only for AI research? Nope. "FP removes the ability to easily share code"? Nope. "Trying to apply functional programming principles to end user application architecture will not be a thing." (This made me laugh.) Have you seen Elm?

I urge you to give FP an honest try before guessing at reasons not to like it.

Collapse
 
joshualjohnson profile image
Joshua Johnson

I never said I didn't like it. I prefer it, in fact, it makes unit testing a breeze!

I never implied that functional programming was for only AI.

And yes when you restrict sharing state within functions, you reuse logic. Essentially using the cut/paste design pattern ;).

However, as we both agreed, it is not the end all be all paradigm we should flock to for all of our programming needs.

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

What you are saying does not sound like any functional programming I know. I use FP for everything I can except for performance/efficiency critical sections. Because it makes testing, reuse, and maintenance easy.

Edit: It sounds like you are trying to apply OO principles like information hiding in your FP code. This is probably why it seems so copy-paste heavy to you. It also sounds like you are primarily criticizing Lisp. While this is certainly a capable FP language, there are many others with different (very practical) emphases. Check out this video and also this site to learn from someone who professes to write BLOBAs (Boring Line-Of-Business Applications) using FP.