Java Functional Programming Idioms
summary
Shows concrete Java 8 idioms: express a prime check with IntStream.range + noneMatch instead of loops, build readable pipelines by aligning stream operations vertically (filter → map → forEach) and rely on the runtime to fuse operations rather than merging calls for micro‑optimisation, prefer method reference for pass‑through lambdas, treat lambdas as glue (no multi‑line lambdas), and keep lambdas pure — avoid shared mutable state (the array trick defeats laziness and breaks correctness).
AI-written summary · about
chapters (12)
- 0:00Introduction to idioms
- 2:51Functional programming basics
- 7:25Thinking functionally
- 12:26Functional pipeline pattern
- 16:47Vertical alignment of operations
- 23:43Performance and lazy evaluation
- 27:59Finding best functions
- 30:24Lambda as glue code
- 38:57Method references
- 43:15Readable lambda parameters
- 47:05Pure functions in Java
- 55:15Summary and closing
related talks
49mJava Functional Programming Idioms
52mFunctional Programming with Java 8
43mRefactoring to Functional Style
55mFunctional Programming Patterns with Java8
57mTen Common mistakes made in Functional Java
01h 31mTransforming Code to Java 8
49mTen Common Mistakes Made in Functional Java 1
57mLearning To Code In Functional Style with Java
