If you follow the latest news about Kotlin, you may have heard that it hit M13. This is quite an important milestone, because it changes the language syntax and addresses a number of critical issues. If you’re using IntelliJ IDEA, be advised that the IntelliJ IDEA 15 EAP build we published this week comes along with a built-in Kotlin M13 plugin, making all the recent changes available out of the box.
Notable language changes in M13 include:
- Late-init properties (making dependency injection easier)
- Sealed classes (for more concise pattern matching statements)
- Annotation declaration syntax (@ is now required) and support for annotation targets (potentially breaking change – Kotlin no longer copies the same annotation to a parameter and the field it is stored in)
- Revisited access modifier/visibility model (more concise and friendly)
- Java get/set pairs seen as properties (a long-awaited feature)
- New layout of .class files for top-level declarations
- Better null-safety for Java interop (Kotlin recognizes @NotNull and @Nullable)
- A fully functional reflection library (lets introspect classes, their members, parameters etc)
Indexing, code completion, and usage search usages performance have also been improved, along with build tools support. More details can be found in the official M13 announcement.
If you’ve been using a previous version of Kotlin, make sure you’re aware of the breaking changes before updating. In case you’ve never tried Kotlin and don’t mind playing with IntelliJ IDEA 15 EAP, this is a good timing for it.
When submitting your feedback (which is very appreciated), make sure to send it to the Kotlin issue tracker.