~/talk

Lazy Java

Talkat Devoxx Belgium 2017 · 2017-11-06..11-10· [java, functional-programming]
slides:none on file

Shows how to implement laziness in Java 8 with concrete code: builds an infinite Stream 'from' and a custom lazy list that defers evaluation, demonstrates a palindrome recursion that causes stack overflow and fixes it with a trampoline to linearize recursion which actually runs on very long inputs, and implements a Reader monad replacing DI so dependencies are injected at evaluation time not construction time. Emphasizes profiling before optimizing and shows the live coding examples compile and execute as claimed.

AI-written summary · about

  1. 0:00Lazy evaluation in Java
  2. 6:13Lazy streams performance
  3. 9:46Lazy vs imperative code
  4. 11:15Prime numbers with lazy streams
  5. 15:00Lazy lists in Java
  6. 20:11Internal vs external iteration
  7. 23:02Stack overflow and tail calls
  8. 26:41Trampolining to avoid overflow
  9. 31:10Lazy evaluation vs DI
  10. 33:15Reader monad for context
  11. 37:39Reader monad example
  12. 40:19Single-step execution
  13. 43:19Reader monad details
  14. 46:12When to use lazy evaluation
  15. 48:47Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.