vJUG session with Simon Ritter: “Project Lambda: Functional Prog. Constructs and Simpler Concurrency in Java SE 8”
In this vJUG session, Simon talks about how Lambda expressions came about from their initial conception, via Lambda calculus, to the implementation which Java 8 delivers. Java has included parallelism in it’s libraries for a while now at varying depths. Simon mentions how Lambdas simplifies the developers code in making use of existing and new libraries.
Simon’s example code snippets are converted from ‘serial’ to ‘parallel’ code in a number of ways. First of all he changes his coding approach from a plain loop into a more functional approach. This extracts the state away from the code which the loop used, but does produce ugly code. However this is neatened the using Lambda expressions, by removing lots of boiler plate and providing snippets of behaviour.
Simon concludes by discussing the options with which Lambdas could have been implemented and the thought process which led to the eventual decision being made to use
invokedynamic under the covers.