M9 is coming
We’ve been working hard on the next upcoming release for Kotlin, M9, and it contains quite a good number of new features and some important changes.
Platform Interoperability Improvements
One of Kotlin’s goals has always been about leveraging existing code, libraries and the JVM ecosystem and being able to mix and match Kotlin and Java. With M9 we’re going to considerably reduce the friction. Types with unknown nullity for consuming or implementing Java-authored API’s, exporting functions as static methods, removing conflicts, and also traits are now compiled in a more straightforward fashion, thus solving the problem with certain code generation libraries that only support simple interfaces.
We want Kotlin compilation to be as fast as Java and to this end we’ve introduced incremental compilation. This optimisation significantly reduces compilation time. It is also compatible with auto-make feature of IntelliJ IDEA, which compiles code in the background as changes are made.
The Compiler and IDE now share understanding of modules, making it consistent between design time and compile time. Completion no longer suggests symbols from libraries that are not included as a dependency for a specific module, improving isolation and reducing chances of having unnecessary external dependencies. For now, the internal visibility modifier will still be treated as public. We still need to see how the user experience for consuming DSLs is before making a definitive commitment in this area.
General debugger improvements which allow for better understanding of Kotlin generated code, providing a better experience with breakpoints and Kotlin specific constructs.
Refactorings and Intellisense
Improvements in usability and new features for IntelliJ IDEA including the long awaited Create from Usage, more intentions (quick-fixes) and code completion enhancements. The Extract Method refactoring now also analyses for code duplication on extracting a new method, suggesting replacements of these with the new method. The Java to Kotlin converter has also been greatly improved, providing a much better conversion of individual or multiple files from Java to Kotlin.
JVM Code Generation
Improvements in code generation for JVM reducing byte code size, increasing performance of generated code, better compatibility with modern HotSpot optimisations in Java8 runtime and enhanced function inlining are amongst some of the things to expect from M9.
M9 is coming soon, so stay tuned for more!
Subscribe to Blog updates
Thanks, we've got you!
Kotlin 1.9.0 Released
Kotlin 1.9.0 has been released! Highlights include: Kotlin K2 for JVM is in Beta, other K2 compiler updates, new enum class values function, new operator for open-ended ranges, preview of Gradle configuration cache in Kotlin Multiplatform, changes for Android target support in Kotlin Multiplatform, preview of custom memory allocator in Kotlin/Native. Learn more!
Introducing Kotlin Notebook
The first experimental version of the Kotlin Notebook plugin for IntelliJ IDEA is now available! This post will offer insight into the plugin’s functionality and use cases, but before launching into that, we’d like to let the plugin speak for itself: https://youtu.be/2PLYlDJPelQ W…
Kotlin 1.8.20 Released
Kotlin 1.8.20 has been released! Highlights include: Kotlin K2 compiler updates, AutoCloseable interface and Base64 encoding in stdlib, new JVM incremental compilation enabled by default, new Kotlin/Wasm compiler backend. Learn more!