Lazy Java by Mario Fusco
4,478 views · Published 12 March 2018 · 51:05 · Indexed 23 September 2026
Channel: Devoxx · 2018 · Science & Technology
Like all imperative languages Java is, with some minor but notable exceptions, an eagerly evaluated programming language. Nevertheless the introduction of lambdas in Java 8 also allowed the adoption of some lazy patterns and data structures that are more typically employed in functional languages. Streams represent the most evident example of how also native Java API has taken advantage of laziness, but there is a number of other interesting scenarios where laziness can be an effective solution to quite common problems. In fact laziness is the only possible technique to process potentially infinite amount of data, or more in general to delay the expensive evaluation of an expression only when and if it is necessary. But laziness is even more than that: for instance the reader monad delays not only a computation but also the need of external dependencies thus lowering the abuse of dependency injection, while a trampoline uses laziness to delay and then linearize recursive calls preventing the overflow of the stack. The purpose of this talk is illustrating why and how implementing laziness in Java with practical examples delivered with both slides and live coding sessions. Mario Fusco is a senior software engineer at Red Hat working at the development of the core of Drools, the JBoss rule engine. He has a huge experience as Java developer having been involved in (and often leading) many enterprise level projects in several industries ranging from media companies to the financial sector. Among his interests there are also functional programming and Domain Specific Languages. He is also the co-author of "Java 8 in Action" published by Manning.
More from this channel
-
2:38:32
Distributed Machine Learning 101 using Apache Spark from a Browser by Xavier Tordoir/Andy Petrella
-
54:28
Dockerize user stories with Mayfly by Maarten Dirkse
-
5:03
Devoxx Belgium 2015 Interview Michael Hoffer
-
15:55
Fast Rest API building with Unfiltered by Joost den Boer
-
1:01:27
Lean Startup for Developers conference by Sebastien Arbogast
-
13:36
Interview Brasil Yara and Vini Senger Devoxx Belgium 2015
-
30:24
Running Docker in production on AWS by Oliver Geisser
-
33:59
Android Architecture Blueprints by David González