DEV Community

Discussion on: Teaching Functional Programming: Two Big Picture Approaches

Collapse
 
eddroid profile image
Ed Toro

I don't mean to give the impression that FP is better. I'm more interested in presenting it as a valid alternative. It is possible to build a "normal" web project using it. But I'm not arguing we should.

Once we accept the possibility that we can, I hope curiosity will compel us to try to figure out how. There are plenty of web frameworks for functional-styled languages to explore.

If you find yourself exploring one of those frameworks, it may violate your intuition. And that will feel "wrong", like a bad code smell. And we're trained to "trust our guts" on those kinds of things.

Before you go on that journey, try some of the thought experiments presented in this article to open yourself up to the possibility that you intuition may be, instead of protecting you from making a mistake, just hiding something useful.

Since most languages are multi-paradigm, you can begin to explore these features in your own code without making a huge commitment - even if you just replace some for-loops with forEach, map, filter, or reduce in some deep down method somewhere. FP isn't all-or-nothing.