Slide 23
Slide 23 text
Spring 5
Spring Boot 2
Java 11
Java 17
Spring 6
Spring Boot 3
Spring Boot 1
Java 8
2015
2016
2017
2018
2019
2020
2021
2022
2023
2014
2012
2011
2010
2013
Spring 4
https://openjdk.org/projects/valhalla/design-notes/state-of-valhalla/02-object-model
Value
Object
(marker)
Identity
Object
(marker)
Cursor
Point
its
box
List
Cursor
its
box
List
Object
Iterator
Abstract
List
(partially
concrete)
String
(identity
significant)
int[]
(mutable
array)
HashMap
(mutable
object)
LocalDate
(VBC = value
based class,
just before
migration)
Memory
Segment
(value object:
secure, no box,
better VBC)
Optional
(VBC migrated
to value object,
a NOID)
int long
float double
boolean char
byte short
Island of Classless
Scalar Primitives
their boxes
IDENTITY
OBJECT REF
(ID-O-SAURs)
object identity
construction safety
fields stay together
fast pointer compare
VALUE OBJECT
REF (NOIDs)
(includes PRIM boxes)
freely copyable
field-wise flattenable
construction safety
atomicity, no identity
THIS MIDDLE SWATH
IS WHAT’S NEW
IN VALHALLA
NON-CONCRETE REF
polymorphic abstract class or interface
field-wise flattenable (like NOID)
freely copyable (like NOID)
no identity (like NOID)
defaults to all-zero bits
no nulls, no direct recursion
no construction safety
no atomicity (tearing)
no polymorphism
extended primitives, with
class-like declaration
POSSIBLE IN VALHALLA
PRIMITIVES (one quadrant) REFERENCES (three quadrants)
PRIM = ¬ REF, scalar/extended primitive REF = ¬ PRIM, all are nullable, recursive
The Zoo of Java Field Types (Valhalla draft design, adding Extended Primitives)