Functional Programming with Java 8
summary
Java 8 demonstrates concrete functional tools: lambda expressions (parameters + body, inferred return), single‑abstract‑method functional interfaces, method references, and streams (filter → map → sum) that replace verbose loops and compute “sum of double of even numbers” without mutable accumulators. Examples run and show lazy evaluation, safe captures via the effectively‑final rule, and easy conversion to parallel execution with parallel streams; a shown mutable closure hack breaks purity and is flagged as a bad idea.
AI-written summary · about
chapters (13)
- 0:00Introduction to FP in Java
- 1:57Problems with Imperative Code
- 5:23Assignment-less programming
- 8:36Immutability and side effects
- 10:40Higher-order functions
- 14:12Lambda expressions
- 17:26Iterators and collections
- 20:42Functional interfaces
- 24:13Method references
- 27:39Declarative vs imperative
- 32:49Closures and scope
- 36:57Lazy evaluation
- 44:10Benefits and conclusion
related talks
55mFunctional Programming Patterns with Java8
51mFunctional Programming with Java
56mJava Functional Programming Idioms
36mHow functional programming change my Java code
38mJava 8: Functional programming
51mHitchhiker's Guide to Functional Programming
48mEmbrace the Func - How Far has Functional Programming Come in Java?
43mRefactoring to Functional Style
