Kotlin 2.0 now accessible with steady model of K2 compiler


JetBrains has simply launched Kotlin 2.0, which it says is a serious replace to the programming language. It was introduced at KotlinConf 2024, taking place Could 22-24, which is an occasion filled with talks about utilizing Kotlin.

“As we speak we’re excited to launch Kotlin 2.0 with a steady K2 compiler, which is multiplatform from the bottom up, understands your code higher, and compiles it twice as quick,” Egor Tolstoy, challenge lead for Kotlin at JetBrains, wrote in a weblog submit

One of many important highlights of this launch is that it features a steady model of the K2 compiler, which is a whole rewrite of Kotlin’s authentic compiler that unifies all platforms supported by Kotlin, and gives a sooner and extra extensible structure, addresses technical debt from the outdated compiler, fixes bugs, and lays the muse for future language extensions. 

In accordance with JetBrains, round 15,000 builders have already used K2, and Meta has already migrated giant parts of its codebase to it. 

“The on a regular basis ardour of the Kotlin group always motivates us to enhance the language, and right now, we’re proud to take an enormous step ahead for the entire Kotlin ecosystem and launch Kotlin 2.0. The brand new compiler structure was constructed to allow us to evolve the language a lot simpler, we are able to introduce new options sooner and in a constant and platform-agnostic approach,” stated Tolstoy.

In accordance with JetBrains, the K2 compiler is vital for multiplatform Kotlin, and to that finish, Kotlin 2.0 additionally introduces a number of new options and enhancements for Kotlin Multiplatform (KMP).

Kotlin now gives first-party help for Compose Multiplatform, and the Jetpack Compose compiler (which powers Compose Multiplatform) now ships with Kotlin as of this launch. 

This launch additionally introduces an improved tooling expertise for Kotlin Multiplatform. It now absolutely understands Xcode tasks and gives full help for Swift. 

Google has additionally began recommending builders swap to KMP and it gives KMP help in a number of well-liked Android libraries, and has migrated a few of its personal apps to it as nicely, reminiscent of Google Docs. 

Looking forward to the longer term, upcoming plans for Kotlin that the staff is now engaged on embrace knowledge recognition and deconstruction, growing abstraction, high-performance clear code, and enhancing the library creator expertise. 

“Kotlin 2.0 considerably boosts your day by day productiveness. It brings a sooner, smarter, and extra sturdy compiler, in addition to even higher help for Kotlin Multiplatform tasks. As a Kotlin developer, you get greater than only a trendy, concise, and secure language. You even have entry to a flexible ecosystem with highly effective frameworks reminiscent of Ktor and Compose Multiplatform, and mixed with JetBrains IDEs, Kotlin 2.0 gives an distinctive developer expertise, empowering you to construct progressive, performant, and dependable functions for all platforms,” Tolstoy wrote. 

Kotlin 2.0 is now accessible within the newest model of IntelliJ IDEA and Android Studio. A full checklist of recent options will be discovered within the language’s launch notes.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *