Nine Highlights from the Kotlin Roadmap
Many of you want to know about Kotlin’s future and what lies ahead. We often talk about the upcoming new compiler, focus on tooling quality and performance, and server-side and KMM experience, but the talks usually don’t give the full picture.
If you want to stay up to date and follow all of the team’s plans, review the Kotlin public roadmap. We’ve just updated it to reflect our plans for 2021 and beyond! This update covers how the language, tooling, and ecosystem will evolve in the upcoming year. You can choose whether to explore the updated roadmap yourself or check out notable highlights in this blog post.
For those who don’t want to read we prepared a video with five most exciting highlights from this update!
2️⃣ Sealed whens
1️⃣ The new compiler takes a big step forward
The new Kotlin compiler is a huge project that consists of rewriting the JVM and JS backends together with the frontend to the new architecture. When fully completed, the project should bring significant performance benefits, enable compiler plugin API support, and give us the opportunity to create new language features. We’ve just released the new JVM backend part of the compiler, and now we’re focusing on other pieces.
To get the performance boost, we need the new compiler frontend. We’ve been actively working on it for some time and are getting close to the Alpha release. At first, it’s going to support only the JVM target and work only on a specific subset of projects. When enabled explicitly, the new frontend will double the compilation speed!
The second focus is bringing the new Kotlin/JS backend to the Stable state. This requires implementing incremental compilation and sourcemap generation.
2️⃣ Sealed whens
Do you have a utility function in your codebase that makes Kotlin’s
when statement exhaustive? Jake Wharton even created a Kotlin plugin introducing an annotation that makes an
@Exhaustive when statement truly exhaustive. We hope that soon you won’t need it anymore!
We plan to introduce
sealed when, a long awaited feature with 230 votes in YouTrack. The specific language syntax isn’t ready yet, but the general idea is to enable the compiler to warn you about your
when statement not being exhaustive. This will make your code safer without the need to introduce your own functions.
Kotlin moves fast by both introducing new stuff and stabilizing experimental features.
Check out our public roadmap to get a full picture of the 48 features that we’re focusing on right now!
3️⃣ Placing a bet on the WebAssembly
We believe that WebAssembly will become the new standard for creating rich web applications in the future, and Kotlin should be a perfect fit there.
4️⃣ New Kotlin/Native garbage collector on the road to experimental
We’ve already prototyped most of the required components to create a simple garbage collector. The next step is to write a multithreading-capable garbage collector implementation. The first version will be slow, and thus not production-ready. But we still aim to release it to the public later this year to start gathering feedback. If you want to know more, Roman Elizarov just published the post that has much more detail about the current state of our garbage collector and future plans.
Prepare to say goodbye to your old buddy
InvalidMutabilityException, as you’ll stop seeing it every time you work with Kotlin/Native!
5️⃣ Improving iOS-related tooling in KMM
KMM is a cross-platform technology, so we want developers to enjoy using iOS-related tooling! Besides the Kotlin/Native memory model rework, there is a lot to be done. For now, we’re focusing on improving the Cocoapods integration UX and hiding the
packForXcode Gradle build task from the default script to simplify project setup and the first time experience.
Pro tip: We have a special YouTrack board that provides a convenient way to see all the 48 features from the roadmap. Try it out yourself!
6️⃣ Support for the Apple Silicon target in the Kotlin Multiplatform tooling
Apple Silicon adoption continues to increase. The Kotlin/Native compiler already works on this platform and can produce binaries for it. To help you fully enjoy Apple Silicon support in your projects, we’re going to support it in the Kotlin Multiplatform Gradle plugin and in all of the Kotlinx libraries.
7️⃣ New ways to improve IDE performance and stability
Fast and smooth IDE support continues to be our priority. While our long-term solution to increase its responsiveness is the new compiler, we’re continuing to support our current tooling and find new ways of boosting your performance.
Kotlin plugin for IntelliJ IDEA and Android Studio uses more than 30 various indexes under the hood. We see many possible ways of improving code analysis speed and stability by refactoring the indexes system. Besides this, we also plan to significantly increase IDE Navigation and Find Usages speed.
Pro tip: The roadmap will have a large update every six months, with some possible changes after each feature release. If you want to follow a specific ticket, just vote for it, and you’ll get notifications when its status is updated.
8️⃣ New core libraries features
We’re continuing to improve standard and kotlinx libraries, such as coroutines and serialization. To name just a few improvements:
- Multiplatform support of suspend tests in coroutines, which will improve the test suite of both KMM and JVM-only projects.
- Integration with Java I/O streaming in serialization, to support deserializing huge files from an arbitrary data source, like a network or filesystem stream.
- Getting rid of
readLine(), which should make the “Hello world” program syntax more intuitive for newcomers.
9️⃣ Community assets with the new style
Have you noticed the new Kotlin logo? This is just a part of our new visual style project, where we updated our colors, typography, and identity. Now we plan to use this new style to update assets provided for Kotlin User Groups:
If you’re a user group organizer, we’d be very grateful for your feedback in this ticket about which assets you’re missing or any other information on how we can make your life easier!
We want each of you to be a part of Kotlin’s future. Your feedback and ideas are what gives our vision of the future a specific shape. We will continue covering our plans in our blog and YouTube channel, so subscribe to both, stay tuned, and share your thoughts and experience with us.
Pro tip: Subscribe to our YouTube channel not to miss a video about the top roadmap highlights!