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!

This entry was posted in Releases. Bookmark the permalink.

15 Responses to M9 is coming

  1. Thank you for such a simple yet powerful language!
    Can’t wait metaprogramming features!

  2. Good stuff! Can’t wait! 😀

  3. Ivan says:

    Please fix Kotlin compatibility with Android Studio
    It’s must have functional for daily usage
    https://youtrack.jetbrains.com/issue/KT-5596

  4. Stan says:

    I 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:

      Hi 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:

      I asked that question in the forum and Andrey in his answer listed some of the major steps to 1.0

  5. kocka says:

    Great to see the incremental compiler finally becoming a reality!

  6. Vorzard says:

    Thanks for the great work. The incremental compilation relies on Gradle, am I right? Or is it done somehow else?

    • Hadi Hariri says:

      In what sense do you mean relying on Gradle?

      • Vorzard says:

        Gradle 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?

  7. Pingback: Next Big Milestone Horizon in Sight for Kotlin | Voxxed

Comments are closed.