Functional Programming


Functional programming is not new. John Backus takes the credit to present this idea formally in his 1977 Turing Award lecture. If you are interested, a link to his paper is here. However, recently there has been a growing trend towards functional programming. You look at the most popular big data platforms, machine learning libraries and the modern javascript frameworks. Functional programming is creating an impact everywhere. Understanding the notion of Functional Programming and its application is quite a bit of work. The best method to understand the Functional Programming principals and the benefits is to learn a Functional Programming language and start using it.
However, this article is an attempt to simplify the learning curve and present the most useful concepts at a single place. Let's start with the most basic question.


What is Functional Programming?

There are disagreements about the answer to this question. However, at the most straightforward premise, here is the definition.

Functional programming is a way of writing software applications using only pure functions and immutable values.

The definition is straightforward, but It may take some time and practice to understand the real meaning and implications of this description. This definition is reasonably good, but it talks only about two things.

  1. Pure functions
  2. Immutable values

The pure function and immutable values are just two elements of the functional paradigm. There are many others and here is a list of top ten Functional Programming concepts.


Elements of Functional Programming

  1. Pure Functions and Side Effects
  2. Referential Transparency
  3. First Class Functions
  4. Higher Order Functions
  5. Anonymous Functions or Lambda
  6. Immutability
  7. Recursion and Tail Recursion
  8. Statements and Expressions
  9. Strict and Non-Strict (Lazy) Evaluation
  10. Pattern Matching
  11. Closures

This list covers the most frequently referred elements. A high-level understanding of all these items is essential to building a sound understanding of Functional Programming. Even if you are planning to learn a Functional Programming language (for example Scala), a good understanding of these concepts is essential. A good understanding of these ideas should help you to relate and justify the language features and constructs. These concepts are also useful to understand and explain the answer to the next big question.

Why functional programming?

If you understand the benefits that these ten items bring to the table, you know the answer to this question. The most significant advantage of FP is that it brings a different approach and facilities to solve your problems. By the end of this article, you should learn many of those tools and the overall functional programming approach.
So, with the stage set, let's take these Functional Programming elements one by one.

Read Next

Pure Functions | Referential Transparency | Benefits of pure functions | First class functions | Higher order function | Anonymous functions | Immutability | Tail Recursion | Expressions in Scala | Lazy Evaluations | Pattern Matching | Closures

By Prashant Pandey -



You will also like: