What’s new in Kotlin 1.3 – InfoWorld

The production version of Kotlin 1.3 is now available and introduces contracts to the type system.

Kotlin had its origins as a language for the JVM but has since been expanded to compile to JavaScript as well. Google has endorsed Kotlin as a mechanism for building Android mobile applications, alongside Java itself. 

Where to download Kotlin

You can access the Kotlin source code on the project’s GitHub repo.

Current version: What’s new in Kotlin 1.3

Kotlin 1.3’s contracts are an experimental addition meant to enrich the type information available through the function system with additional meanings useful at the call site. A contract lets a function tell the compiler things such as “I affect smart casts this way” or “I execute this lambda exactly once.” The Kotlin standard library already has contracts added to several functions, which work regardless of experimental flags.

Other new features in Kotlin 1.3 include:

  • The coroutines capability is in stable status, meaning there have been changes in the APIs and ABIs based on feedback. There is migration support to bridge old, experimental coroutines with new ones. Also, introspection is supported for suspend functions: isSuspend, KCallable.callSuspend, and KCallable.callSuspendby.
  • In the standard library, support has been improved for unsigned integer types. Unsigned types and arrays should feel more like first-class citizens.
  • With an API improvement in the standard library, the Random class introduced in the previous beta has gained extensions to generate unsigned numbers and arrays and unsigned bytes. Also, an extension called random() is being