Why you should learn Functional programming

  1. Functional languages do not obfuscate what they are doing. If you go deep enough into them, all languages are functional, however some hide this truth from their users. Why do we have to plumb the depths of some magical black box in order to understand what our code is doing?
  2. Functional languages are easier to test. There is no notion of global scope or spooky action at a distance, you simply have your function, feed it input, then assert that it returns the expected output.
  3. Functional languages do not rely on esoteric design patterns. Once you dig into map and reduce functions, you realize these help solve some of the fundamental problems of your code with some bare-metal tools.
  4. Functional languages do not rely on shifting contexts. With over 20 years of development experience, I can testify that most of the errors I have seen in Object-Oriented code had something to do with code that would use a functional approach in some parts, and rely on inheritance and classes in another. Confusion and errors inevitably followed. You can simplify your life by removing all the non-functional concerns.
  5. Learning functional paradigms makes you a better developer. Even if you don’t jump ship and rush to take up a functional language, understanding the patterns that they offer will make you a better coder. I have shuddered while looking back at how I solved particular problems in an Object-Oriented language; frequently I recognized that the solution could be solved cleanly and eloquently had I only known of some functional approaches to these problems.




Code person.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Simplified Vertica Copy Cluster Config

How To Develop Modern Web Application Development By Doing Less

Strategies To Develop A Blockchain Android App

What is no code? The pros and cons of no code for software development.

No code- A game changer

Binary Search

Route to nowhere

Road with double yellow lines leading to snow-covered mountains off in the distance.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Everett Griffiths

Everett Griffiths

Code person.

More from Medium

Why I am Learning Haskell

A green lattice with a light beige background. Each vertice of the lattice has a water droplet hanging from it.

My first 77 hours with Haskell

Haskell in production

Haskell : Learn the beginner’s way