Kotlin 1.4, a prepared update to the statically typed JVM language developed by JetBrains, is established to incorporate null-check optimizations.
Starting off with the Kotlin 1.4 release, all runtime checks will toss a
java.lang.NullPointerException as an alternative of a
The modify is made to open up more prospects for null examine optimizations by the Kotlin compiler or bytecode processing applications these kinds of as the Android R8 optimizer. It will implement to the
!! operator, parameter whole checks in the method preamble, the
as operator with a non-null sort, and platform-typed expression null checks. The adjust will not apply to
lateinit null checks and specific library phone calls these as
Kotlin has obtained a increased profile because remaining endorsed by Google in May 2017 as an formal language for setting up Android cellular applications, along with Java. In addition to detailing the plans for Kotlin 1.4, the Kotlin Foundation released Kotlin 1.3.50 with the adhering to options:
- An API for little bit manipulation in the common library, obtainable in a beta form.
- An improved Time and Duration API, also in a beta phase.
- For the JetBrains IntelliJ Concept IDE, Kotlin 1.3.50 improves the Java-to-Kotlin converter to minimize the quantity of “red code” to deal with manually after a conversion.
- Experimental generation of external dependencies for NPM dependencies in Gradle Kotlin/JS jobs, working with the Dukat converter. Dukat converts TypeScript files to Kotlin external declarations.
- Java compilation assist in multiplatform tasks, by contacting the new
withJava()operate of the DSL.