• Every programming language is defined by certain syntactical and
structural norms – Programming Paradigms • Paradigms available: Imperative, Object-oriented, Functional, Logic, Procedural, etc… • Modern programming languages are complex enough to be built upon one or more paradigms. • “Java imbibed functional programming technique within the syntactic structure of the language “ • Java code can be developed using this paradigm without breaking the existing architecture or worrying about the backward compatibility. FUNCTIONAL PROGRAMMING AND LAMBDA CALCULUS
• Functional Programming Origin -
1. Mathematical Model – Theory of Functions 2. Lambda Calculus – Lambda • Using lambda in Java is that it simplifies and reduces the amount of source code needed to create certain constructs, such as anonymous classes • Java introduced a new operator (the ->)—and the concept of type inference. • This structure allows one to write simpler and cleaner code. • Used by JavaScript OVERVIEW OF OOP VS. FUNCTIONAL PROGRAMMING
In OOP, everything is represented as an object; therefore, every solution to
a problem must be defined as a scheme of classes and their properties even if we need only to implement the behaviour. In functional programming we directly implement a function rather than an class that contains a function ] CONCLUSION
As a general purpose programming language, Java imbibed
the functional paradigm where interface and lambda expression played a crucial role in collaborating new rules of functional programming within the DNA of Object-Oriented Java. CONSTRUCTOR