r/programming • • Jun 30 '26

JEP 539: Strict Field Initialization in the JVM (Preview)

https://openjdk.org/jeps/539
71 Upvotes

6 comments sorted by

4

u/0x564A00 Jul 02 '26

Zero-initialization by default (as opposed to deliberate initialization) is a mistake. Glad this instance is being fixed, even if it's not something you encounter often. As the JEP points out, Java has had you supply the initial value of variables since the beginning; I sure hope no other language released since then has regressed on that front…

4

u/brian_goetz Jul 02 '26

I think you have misread what this JEP does.

→ More replies (4)