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.
Incremental Compilation
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.
Modules
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.
Debugger
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.
JavaScript
Support for JavaScript platforms has been improved to the point where almost all language features can be used in modules targeting JavaScript runtimes. The standard library has been pre-compiled and now ships with the compiler, allowing to write code that uses a JavaScript-compatibile subset of the standard functions, such as those dealing with collection manipulations. And with a tiny modification, the code can also run on node.js.
M9 is coming soon, so stay tuned for more!
Adel Nizamutdinov says:
October 1, 2014Thank you for such a simple yet powerful language!
Can’t wait metaprogramming features!
Geobert Quach says:
October 1, 2014Good stuff! Can’t wait! 😀
Ivan says:
October 2, 2014Please fix Kotlin compatibility with Android Studio
It’s must have functional for daily usage
https://youtrack.jetbrains.com/issue/KT-5596
Stan says:
October 2, 2014I remember there was a slide with a timeline that explained how much M* releases you plan before the final release.
But I can’t find that slide and it is not clear from this blog post where you are in your global plans.
Hadi Hariri says:
October 2, 2014Hi Stan,
There’s no determinate number of milestones. Milestones are point-in-time releases where we feel there’s enough functionality and quality is up to part for a release. In terms of actual schedule, we’re aiming at first half of 2015.
kocka says:
October 3, 2014I asked that question in the forum and Andrey in his answer listed some of the major steps to 1.0
kocka says:
October 3, 2014Great to see the incremental compiler finally becoming a reality!
Vorzard says:
October 4, 2014Thanks for the great work. The incremental compilation relies on Gradle, am I right? Or is it done somehow else?
Hadi Hariri says:
October 6, 2014In what sense do you mean relying on Gradle?
Vorzard says:
October 6, 2014Gradle not long ago added incremental Java compilation, and I could be wrong but it seems to me that you need a build tool or daemon to do incremental compilation.
For example with Scala you either need sbt, Zinc (the standalone version of sbt’s incremental compiler) or Gradle (that uses Zinc).
So how incremental compilation works with Kotlin? Is it part of the standalone compiler (kotlinc) and can be integrated with any build tools? Would it work with Maven?
Hadi Hariri says:
October 20, 2014Currently we support incremental compilation in IntelliJ IDEA only.
yigit says:
November 19, 2014any ETA for gradle support ?
Rostislav says:
December 1, 2014How is it suppose to work? I’m using gradle in IDEA, and all changes take much time to compile, about 40 seconds.
Andrey Breslav says:
December 16, 2014Hard to give estimations here, some research is required.
Next Big Milestone Horizon in Sight for Kotlin | Voxxed says:
November 13, 2014[…] attention in 2014. But there’s another Scala-alike language in the wings: Kotlin. With milestone release 9 just around this corner, this heavy industrial, statically-typed JVM language is rapidly evolving […]