The Dark Side of Java 8
summary
Java 8 introduces concrete bugs and surprising behaviors: the Stream API’s flatMap evaluates entire inner streams so short‑circuiting can fail (infinite or expensive inner streams), and Java 9 later adds takeWhile / dropWhile to solve conditional termination. Lambdas still choke on checked exceptions unless you use a sneakyThrow generic cast to rethrow checked exceptions as unchecked. Parallel streams run on the shared ForkJoinPool by default, making parallelism unpredictable and sometimes slower; many issues get fixed in later JDKs.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 0:40History of Java 8
- 2:19Why Java 8 was broken
- 3:14Java Real Cycle
- 5:09Conditional Stream Termination
- 6:40Limit Method
- 7:50Stream Flat Map
- 8:08What are Streams
- 8:51Stream Sequences
- 9:28Cohesion
- 9:50Example
- 11:33Algorithm
- 13:21Result
- 14:35Take while implementation
- 16:09Nested List
- 17:21Functional Interfaces
- 18:07Exception Throwing
- 18:38Repackage
- 19:03Outsmart Oracle
- 21:57Slow Down
- 22:12Runtime Exceptions
- 22:33Parallel Streams
- 23:00Parallel Computing
- 24:31Multiple Questions
- 25:11Static Fork Drawing
- 25:28For Joint Framework
- 25:55Fork Method
- 26:27Third Method
- 31:15Key takeaway
related talks
47mThe Dark Side of Java 8 - Lessons Learned
49mJava 8: the good, the bad and the ugly
46mStreams in JDK 8: The Good, the Bad, and the Ugly
01h 07mJava SE: Lambdas, Streams & Future Directions
47mBeyond lambdas, the aftermath
49mJava Streams: Beyond The Basics
50m10+ new features you ought to know using Java 8
01h 05mJava 8: The Good, the Bad and the Ugly
