Connect with us

Technology

What’s New in Kotlin

Published

on

Spread Articles to Your Friends

Kotlin is a programming language. With Kotlin 1.4, Jetbrain’s Java alternative has several new language features. There are also some tool chain improvements. Jetbrains has released Kotlin 1.4 . Among other things, several language features are new to make writing Kotlin code more convenient. So far, for example, only functional interfaces defined in Java have benefited from the shorthand syntax in Kotlin. From version 1.4, however, Kotlin interfaces can also be marked as functional.

When listing parameters, from Kotlin 1.4 the rule that the parameters must first be named without a name is no longer applicable. So you are not only allowed to f(1, y = 2)write as before , but f(x = 1, 2)would also be correct from now on. The use of trailing commas in lists is also permitted in the future. Lists can easily be expanded or entries swapped without having to delete a comma.

Library authors will be able to use the explicit API mode in the future. In this mode, the compiler insists on some language properties that are actually optional. This is to help make the library’s public interface clearer and more consistent. Depending on the configuration, the compiler issues an error or a warning if it is not complied with.

Kotlin is a open source programming language and expected to replace Java. Its a five years old language. Google announced Kotlin as a first-class programming language for writing Android apps

Continue Reading
Advertisement
Shares