Search

Suggested keywords:
  • Java
  • Docker
  • Git
  • React
  • NextJs
  • Spring boot
  • Laravel

Jetbrains released Kotlin 2.0.0 and new Kotlin K2 Compiler

  • Share this:

post-title

Jetbrains created Kotlin programming language. Kotlin is a mult platform programming language where the application can run in Desktop, Web, Android and iOS. It also supports Native and Webassembly. It reduces time spent writing and maintaining the same code for different platforms while retaining the flexibility and benefits of native programming.

Kotlin 2.0.0 relesed with following features

  • New Compose compiler Gradle plugin
  • Generation of lambda functions using invokedynamic
  • The kotlinx-metadata-jvm library is now Stable
  • Monitoring GC performance in Kotlin/Native with signposts on Apple platforms
  • Resolving conflicts in Kotlin/Native with Objective-C methods
  • Support for named export in Kotlin/Wasm
  • Support for unsigned primitive types in functions with @JsExport in Kotlin/Wasm
  • Optimize production builds by default using Binaryen
  • New Gradle DSL for compiler options in multiplatform projects
  • Stable replacement of the enum class values generic function
  • Stable AutoCloseable interface

 

K2 Compiler

K2 compiler brings major performance improvements, speeds up new language feature development, unifies all platforms that Kotlin supports, and provides a better architecture for multiplatform projects. Jetbrains peformed some tests on couple of projects and saw the K2 compiler brings up to 94% compilation speed gains, initialization phase is up to 488% faster, 376% quicker in the analysis phase compared to the previous compiler.

The Kotlin compiler introduced smart casting, where compiler can automatically cast an object to a type in specific cases, saving you the trouble of having to explicitly cast it yourself. Refer to their migration guide to migrate Kotlin compiller to newer version.

Kotlin 2.0 offers an exceptional developer experience, empowering you to build innovative, performant, and reliable applications for all platforms. Jetbrains provides complete developer ecosystem, has powerful frameworks such as Ktor and Compose Multiplatform and combined with JetBrains IDEs increase the productivity of developer.

Editorial Team

About author
This article is published by our editorial team.