Monadic Java: Functional Programming Patterns Applied
[presentation]Track: Java na Crista da OndaLocal:Ballroom 214:40 - 15:30Abstract:
Category Theory is to functional programming what GoF design patterns are to object oriented programming. Since Java is about to introduce lambda expressions, time is arrived also for Java developers to learn something more about functional programming patterns. Monads are probably the most expressive (and very likely the most misunderstood) of these patterns.
So the purpose of this talk is to explain monads, clarify with very practical examples how and when they should be used, underline their advantages and show how they can be implemented in Java 8 leveraging the upcoming lambda expressions.
Lambdas in Java
Lambda expressions are for sure the most important new feature in Java 8 and very likely the biggest change to the language since Java appeared on the IT scene almost 20 years ago. In fact they are not just a new feature. They imply a paradigm shift toward a more functional style of programming. For this reason Java developers not only have to learn the mechanics of the new lambda expressions, but most importantly, the need to understand how to use them effectively.
The tutorial will start explaining the syntax of lambda expressions together with the rationale that drove their introduction in Java. After this we will discover the most important functional patterns enabled by lambdas, using many practical examples developed in a live-coding session. Finally we also explore principles of functional programming and their advantages over object-oriented programming, especially when developing highly parallel applications.