Kotlin 2.0 now out there with secure 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, occurring Could 22-24, which is an occasion filled with talks about utilizing Kotlin.

“At this time we’re excited to launch Kotlin 2.0 with a secure K2 compiler, which is multiplatform from the bottom up, understands your code higher, and compiles it twice as quick,” Egor Tolstoy, venture lead for Kotlin at JetBrains, wrote in a weblog publish

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

Based on 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 in the present day, 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 will introduce new options sooner and in a constant and platform-agnostic method,” stated Tolstoy.

Based on JetBrains, the K2 compiler is essential 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 supplies 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 totally understands Xcode tasks and affords full help for Swift. 

Google has additionally began recommending builders change to KMP and it affords KMP help in a number of in style Android libraries, and has migrated a few of its personal apps to it as properly, corresponding to 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 bettering the library writer expertise. 

“Kotlin 2.0 considerably boosts your every 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 fashionable, concise, and protected language. You even have entry to a flexible ecosystem with highly effective frameworks corresponding to Ktor and Compose Multiplatform, and mixed with JetBrains IDEs, Kotlin 2.0 affords an distinctive developer expertise, empowering you to construct modern, performant, and dependable functions for all platforms,” Tolstoy wrote. 

Kotlin 2.0 is now out there within the newest model of IntelliJ IDEA and Android Studio. A full listing of recent options might be discovered within the language’s launch notes.

Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox