Kotlin 1.8 has been officially released by JetBrains


Kotlin 1.8, the latest version of the popular programming language, has been officially released by JetBrains. The release includes several new features, such as a new compiler parameter that disables optimizations to improve debugging. Additionally, two experimental functions for recursively deleting or copying directories have been added.

One of the main changes in Kotlin 1.8 is the removal of two legacy issues. The old backend, which has been deprecated since version 1.5, is no longer available. Instead, a new common middle layer for all of Kotlin’s multi-platform targets, including the Java Virtual Machine (JVM), JavaScript, and native applications, has been stabilized with the JVM IR (Intermediate Representation) backend.

Another change is that Kotlin 1.8 no longer works with outdated JVM targets 1.6 and 1.7, which were JDK 6 and 7, respectively. The standard libraries of the language are now compiled uniformly for JDK 8. This change is expected to improve the performance of the typeOf() function, as internal caching has been replaced with ClassValue.

In addition to these changes, Kotlin 1.8 includes new compiler parameters for debugging and improved interaction with Apple languages. The annotation @ObjCName allows developers to specify their own name for Swift or Objective-C beyond the Kotlin name for functions and methods. The annotation @HiddenFromObjC completely hides a Kotlin declaration from the Objective-C API, while @ShouldRefineInSwift orientates itself with Apple’s macro NS_REFINED_FOR_SWIFT for functions, in which a wrapper in Swift is intended to replace the original declaration.

Share This:

Leave A Reply

Powered by FrontNet