Trite Switches
summary
Overview of switch statements: their evolution, inherited problems from Ceylon, and current complexities around string/enum handling, pattern matching, and exhaustiveness. Discusses a flawed OpenJDK implementation and identifies language features still missing to make switches cleaner and safer.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:24Speaker intro
- 2:06Switch basics
- 6:17Break and fall-through
- 8:41DAF device optimizations
- 10:29Java switch evolution
- 11:10Bytecode instructions
- 13:14Switch with enums
- 15:23Switch with strings
- 18:15Pattern matching
- 21:00InvokeDynamic basics
- 22:22Switch expressions
- 25:12Pattern matching concept
- 27:42Instanceof limits
- 28:44Pattern matching with switch
- 30:05JSON node matching
- 32:57Nested patterns
- 34:20Switch bootstrap
- 36:48Dumble strategy
- 38:56Switch evolution philosophy
- 39:37Future Java features
- 41:00Conclusion & Q&A
