~/talk

A New Model for Java Object Initialization

Talkat JVM Language Summit 2024 · 2024-08-05..08-07· [java]
links:none on file
slides:none on file

Proposal repurposes the ACC_STRICT flag and adds Flexible Constructor Bodies so instance fields, statics and arrays can be strictly initialized and never observed in a larval state. It introduces library forms like newInstanceWith to create strictly-initialized arrays, changes serialization to deserialize fields before publishing, and enforces that value-class fields get ACC_STRICT. A corpus analysis of 2.3M classes finds 63% of final fields movable to early init, 12% maybe, 25% requiring refactor. Goal: enable safe flattening, reliable null-restrictions and predictable final-field caching.

AI-written summary · about

  1. 0:00Java object initialization challenges
  2. 13:12Strict initialization proposal
  3. 27:07Instance fields and arrays solutions
  4. 40:29Strict initialization benefits
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.