~/talk

Better immutability in Kotlin with Valhalla

Talkat JVM Language Summit 2025 · 2025-08-04..08-06· [java]
links:none on file
slides:none on file

Kotlin moves its immutable-data work onto Project Valhalla to get runtime-optimized, identity-less value types and multi-field scalarization instead of the current single-field inline class hacks that require mangled bytecode and fall back to boxing. The plan adds ergonomic updates via copy vars and library wither/copy-with lambdas that compile to structural wither calls for stable binary compatibility, while unresolved early initialization rules and some language integration details remain to be fixed. Performance wins come from JVM runtime optimizations rather than compiler-only inlining.

AI-written summary · about

  1. 0:00Introduction
  2. 1:07Current state of Kotlin inline classes
  3. 9:53Benefits of Project Valhalla
  4. 16:18Challenges with early initialization
  5. 23:31Beyond shallow immutability
  6. 26:16Ergonomic updates with copy vars
  7. 35:41Integrating copy vars and functions
  8. 40:39Feature interactions with lambdas
  9. 46:13Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.