Immutability is a powerful tool for making code safer, easier to reason about, and more concurrency-friendly, but adopting it often comes with trade-offs. Kotlin embraces immutability in its design, yet there is a lot of untapped potential to make it even stronger.
In this session, we will start by digging into Kotlin's current approach: what the language already offers, where the gaps are, and the reasons behind its choices. We'll then venture into Project Valhalla, an upcoming JVM initiative that brings value types and new memory models, offering exciting ways to make immutability cheaper and more practical for Kotlin developers.
Finally, we'll look further ahead. What could a more powerful immutability story for Kotlin look like? How could it fit naturally with features like smart casts, coroutines, and the pragmatic spirit of the language? We'll explore ideas and possibilities for taking immutability to the next level without sacrificing the things that make Kotlin so developer-friendly.
If you're curious about how Kotlin and the JVM are setting the stage for a safer, faster future, and how immutability could play a starring role then this talk is for you.