Why Functional Programming?

Why Functional Programming?

You might have already heard of functional programming. What is it for? Is it any good? Should we care?

If you are coding in any modern programming language, like JavaScript, Java or Phyton, then you have probably used it already!

What is it for?

Functional Programming(FP) is a way of structuring code - just like Object Oriented Programming(OOP). If you are using OOP, then you can still add a functional flavour to your code.

Is it any Good?

Yes. FP fixes problems of OOP: Complicated class diagrams, obscure design patterns and magical side effects. FP has none of them. It doesn't even need Objects!

Should we care?

Oh, hell yeah! All modern programming languages are slowly adding functional features. For example:

  • Lambda Functions

  • Immutability

  • Union Types

  • Records

  • Pattern Matching

Where to start?

Probably start googling "Functional programming in <Programming Langauge>".

You can also look for a book (probably of the same name)

Or if you are not interested in a book, you can just subscribe to this blog. This post is part of a series, in which we look at functional programming from different perspectives and by using different languages.

If you have questions, feel free to leave a comment.

The next entry in this series explains Pure Functions using JavaScript, but you can follow along using any other language. Hope to see you there.