On Default Values for Primitive-Like Classes


Primitive defaults are chosen so that they are (probably) represented by memory set to one or more bytes with all bits set to zero; we call these all-zero-bits values. We want “primitive-like” classes to have similar optimization opportunities, even if some classes will choose to nominate defaults values that are not all-zero-bits values. This document discusses possible semantics for such default values, as well as examines their possible quality of implementation, as supported by the JVM and runtime. It will look at cross-cutting interactions with class definition, classfile format, class initialization, bytecode verification, instance construction, and array creation (with some notes on frozen arrays).

More at https://cr.openjdk.org/~jrose/values/default-values.html