Valhalla Nullness Emotion
summary
Prototype JVM and JIT demonstration shows value classes flatten to stack and remove boxing, with equals/hashCode computed from fields, synchronization and weak references throwing identity exceptions; a Mandelbrot demo drops ~600 ms class-based runtime to primitive-equivalent speed, and a GH benchmark with 1M elements makes an array of null-restricted value wrappers match primitive array throughput. Runtime JIT enables retrofit without recompilation. Roadmap: stage 1 value keyword, stage 2 runtime nullness via null-restricted (bang) and ?, stage 3 retrofitting primitives as value types.
AI-written summary · about
chapters (14)
- 0:00Valhalla introduction
- 1:52Value classes overview
- 7:02Value vs identity classes
- 9:17Demo: value classes
- 14:35Value class limits
- 17:11Performance benefits of value classes
- 21:32Strict field init
- 23:02Compatibility
- 26:02Null handling
- 28:41Nullness analysis
- 36:02Null with bang operator
- 43:14Primitives as values
- 45:47Default values & generics
- 50:21Q&A








