by kjeetgill · 3y ago · 0 comments
The point is that static final variables interact especially well with the JIT's constant folding machinery. But lazy loading a constant necessitates that it can't be final: it's initially null until it's effectively final after the first lazy load. This finality is clear to the developer but not to the JVM.
This is introduces a way to implement lazy constants via a blessed class that solves this.
The article is pretty clear about what the point is — but does require some careful reading and context.