Functional programming in Java

Why Functional Programming and Why to Bother

April 3, 2020

Before going into the details of functional programming, the first concept which needs to be discussed is why functional programming ?

Traditionally, JAVA was used solely for object oriented programming which included dealing with creation and relation between objects, inheritance, polymorphism etc. But now-a-days functional programming gives us one more tool to work with. The benefits of learning functional programming approach are listed below:

  • As here the programmer tells the program what to do rather than how to do which makes the program more understandable.
  • The testing and debugging is more easy with this approach.
  • The code is more concise and simple while using functional programming as the abstraction hides the complexities.
  • It adds to the skill set of the programmer as the concepts of functional programming are used by many programming languages.

Now, the next point which has to be discussed here is the base on which the concept of functional programming resides. As Object oriented programming deals with objects, similarly functional programming deals with functions. The Lambda Calculus is the base of functional programming which treats function as a value i.e

y=f(x)

which means that where ever f(x) is appearing we can simply replace it with y.

The next blog will throw more light on the concept of Lambda Calculus .

Stay Connected !!