Posts

Showing posts from September, 2018

Java Functional Programming : 2. Lambda Expressions & Java Functional Interfaces

Image
This is the multi part series on Java Functional Programming 2. Lambda Expressions & Java Functional Interfaces Since this topic could be new to most of the programmers we would address it in an iterative way. We shall throw in the concepts without much detail, and make the programmer understand one aspect of it. Then when that is clear we shall come back and then begin with another aspect. This way in many iterations and repeating different aspects the programmer would get a fair knowledge of the subject. IT is advised that the programmer practice and refers the Java API along the way. No amount of reading can replace the virtues of a first-hand programming. In programming, a Lambda Function (or Lambda Expression or Anonymous Function) is a function definition which is not bound to an identifier. They are passed as a parameter to higher order function and can be returned back from a function. Java did not have a framework to define just the function and pass the...

Java Functional Programming : 1. Introduction

This is the multi part series on Java Functional Programming  1. Introduction As per Wikipedia – “ In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. ” Lambda Calculus was first formulated by Alonzo Church in 1930 . Functional Programming finds its roots in the Lambda Calculus. Let us see a quick comparison between the two programming paradigms – Imperative and Functional. This is independent of Java programming language and will help us build the concepts later. Difference Between Imperative & Functional Languages Imperative Language Functional Language Point 1 The assignments can change over the course of program execution. A reference is associated with only one value, they do not change, are immutable ...