Functional Programming

What is Functional Programming?

In computer sciencefunctional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that map values to other values, rather than a sequence of imperative statements which update the running state of the program.

Learn more:

composing pure functions, avoiding shared state, mutable data, and side-effects.

  1. Easier to determine inputs.
  2. Easier to determine outputs.
  3. Easier to demonstrate and prove you have a correct program.
  4. Easier to test programs too difficult to prove.

Why is functional programming so great?

If you try to perform with memory efficiency and logic at the same time, the problem is that you may create hidden side effects which cause a lot of bugs. Thus, the idea in functional programming of keeping functions smallpure, and composable doing one thing at a time and doing it well this idea of immutability the idea that functions that take inputs and output. So the function can be used with other functions. It allows us to have a predictable program where it minimizes bugs.

Leave a Reply

Your email address will not be published.