Functional Programming In Java 22 - Understanding the Building Blocks of FP
summary
Explains which Java 22 features actually change FP practice: Java 22 unnamed patterns with Sealed Interfaces and Records enable exhaustive pattern matching and destructuring; the decade‑old Streams and java.util.function remain the main toolbox but lack lazy evaluation, stronger type inference and native monads. Shows a working, increasingly unreadable implementation of Pirates Liar’s Dice that uses a simulated Either monad and heavy composition, measures where composition, currying and pattern matching help, and documents where verbosity, weaker inference and side‑effect handling break down.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker intro
- 1:56Java’s functional evolution
- 8:52Algebraic data types in Java
- 17:11What is functional programming?
- 23:00Pure functions and referential transparency
- 24:03Currying and higher-order functions
- 30:13Morphism and data transformations
- 34:51State and side effects in FP
- 38:05Building a functional game
- 40:35Challenges of pure FP in Java
- 42:20Practical takeaways and conclusion
