article banner

Kotlin for Developers series is updated to Kotlin 1.9 and ready for 2.0

Four years have passed since I published the Effective Kotlin. Kotlin and its ecosystem are changing, and many people ask me if its content is still up-to-date. It is! Not only the book was written to concentrate on the knowledge that stays valid for a long time, but I updated it to the newest version of Kotlin, as well, as I made sure that all the books from the Kotlin for Developers series are updated to Kotlin 1.9 and ready for Kotlin 2.0. What does it mean?

Updates for Kotlin 1.9

All the books were written or updated when I was using Kotlin 1.9 already. I also made some explicit changes to make them ready for this update. Here are a couple of examples:

  • Kotlin Essentials presents entries as the primary way to get enum items (instead of values).
  • Kotlin Essentials presents ..< operator (instead of until) as the primary way to create an open range, and describes it in the operators section.
  • Functional Kotlin describes the most modern collection processing names (many names has changed, like changed to )

Ready for Kotlin 2.0

I was writing and updating all the books knowing what I can expect from the future versions of Kotlin, what was reflected in many chapters and items, but here are a few clear examples of how those books are ready for future changes:

  • Functional Kotlin has the whole chapter dedicated to context receivers. This feature is still experimental, and planned to be introduced in Kotlin 2.0 (though I consider it rather stable as it is used in many places in Kotlin Compiler).
  • Kotlin Coroutines presents the most modern (sometimes experimental) API of Kotlin Coroutines. The most important one is limitedParalellism function, that allows an amazing (but yet experimental) way to create dispatchers that precisely manage used threads. Another example is runTest function (with backgroundScope), that is also experimental, and yet important, and I present it in the chapters dedicated to testing.
  • Advanced Kotlin presents K2 compiler plugins that will become a standard since Kotlin 2.0.