The advantages and Disadvantages of Functional Programming

Pros and cons of Functional programming

Vatsal Kumar
2 min readJul 17, 2021

Introduction:

Functional programming allows you to write more complex code and it’s easier to test the code. The main distinguishing features of the development of software that uses functional programming are pure functions; avoiding shared state, inconstant data, and side effects.

Pure functions without side effects are deterministic functions. A deterministic function means that for the same set of input values it returns the same result. The properties of such functions are very important to functional programming. Pure functions, for example, have reference transparency — the function call is interchanged with its final value without changing the program values.

Advantages:

  • Functional programming is well-known for its high-level appearance, which conceals a great number of tiny subtleties, such as iteration efficacy. This shortens the code and, as a result, reduces the number of faults that can be accepted.
Photo by Den Harrson on Unsplash
  • Because of the language’s and structure’s flexibility, you may bring functional programming closer to the problem as it evolves. Not the other way around. Furthermore, FP provides several novel and intriguing techniques for tackling complex problems that Object-Oriented Programming practitioners sometimes overlook.
  • Working with functional languages provides perfect and quick code writing, facilitates testing and debugging. You’re working with high-level programs, and the functions signatures are more informative.

Disadvantages:

  • There is no systematic vocabulary for functional languages. Purely functional vocabularies work slow-moving than the hash tables, and for some applications, this can be condemnatory. In the second place, there is no purely functional fragile hash map. However, for most coders, this deficiency may remain unnoticed.

End Notes:

In this article, we learned the advantages and disadvantages of functional programming.

Cheers!

--

--