"LazyConstants in JDK 26" [IJN]

"LazyConstants in JDK 26" [IJN]

0 Ocena
0
Odcinek
49 of 60
Czas
10min
Język
Angielski
Format
Kategoria
Literatura Faktu

Lazily initializing fields in Java is error-prone and undermines constant-folding. JDK 26 comes with JEP 526, which previews LazyConstant, a type that lazily initializes a value through a given Supplier. It executes that supplier at most once successfully and then assigns the value to a field annotated with @Stable, which allows constant folding. This API is also a poster child for how OpenJDK develops and evolves features.


Słuchaj i czytaj kiedy chcesz

Witaj w nieskończonym świecie literatury

  • 7 dni za darmo
  • Czytaj i słuchaj jak chcesz i ile chcesz
  • Ponad 500 000 tytułów
  • Tytuły dostępne wyłącznie w Storytel oraz Storytel Originals
  • Łatwa rezygnacja w dowolnym momencie
Wypróbuj
Cover for "LazyConstants in JDK 26" [IJN]

Możesz polubić także ...