Two changes in the Java ecosystem look unrelated at first glance: lazy constants and ZGC. One is about when values get created. The other is about when memory gets reclaimed. But both are really about the same thing: moving cost away from the hot path without hiding the consequences.
That is the hard part of language and runtime design. If a default is too eager, startup and initialization pay for work that may never matter. If a runtime is too aggressive about stopping the world, latency-sensitive applications pay for pauses they cannot afford. Lazy constants and ZGC are both responses to that problem.
[Read More]





