Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's Kotlin's compatibility policy?

Tags:

kotlin

Once Kotlin 1.0 is out, what will be the compatibility policy? As a user, I hope Kotlin would keep its compatibility, either in source or binary. Just as serious as Java.

On contrast, Scala is a bad example. Failing to keep its binary compatibility between minor versions drove me away. And I believe a lot of users have left Scala partly because of its compatibility issue. This caused many libraries (including SBT at my time) cannot provide a complete suite of distributions for the whole series of Scala versions. This is just binary compatibility issue. Imagine if source compatibility was broken.

I have decided to use Kotlin in my company's commercial project. So I really need to be sure Kotlin is serious about keeping compatibility, instead of pursuing beauty.

like image 392
Winter Young Avatar asked Dec 21 '15 14:12

Winter Young


People also ask

What do you think is Kotlin JVM compatible or not?

Yes. Kotlin is 100% compatible with the JVM and as such you can use any existing frameworks such as Spring Boot, vert. x or JSF. In addition, there are specific frameworks written in Kotlin such as Ktor.

Are Kotlin versions backwards compatible?

All binaries are backwards compatible, i.e. a newer compiler can read older binaries (e.g. 1.3 understands 1.0 through 1.2), Older compilers reject binaries that rely on new features (e.g. a 1.0 compiler rejects binaries that use coroutines).

Is Kotlin 1.3 deprecated?

Passing single element to vararg in named form. Short summary: in Kotlin 1.3, assigning single element to vararg is deprecated and should be replaced with consecutive spread and array construction.

Can you execute Kotlin code without JVM?

We can execute JVM, which stands for Java Virtual Machine is a feature of Kotlin. This feature compiles a Kotlin code into a native code, which can be done without JVM too.


1 Answers

Kotlin isn't out yet (UPD: now it is). Changes to the language are to be expected (even changes that break code and binary compatibility).

With the Beta release the binary format was finalized, so we shouldn't expect changes there anymore (but they might still happen if bugs have to be fixed).

After 1.0 gets released the language and the binary format is supposed to be backwards compatible forever.

Source: http://blog.jetbrains.com/kotlin/2015/11/the-kotlin-language-1-0-beta-is-here/

like image 144
mhlz Avatar answered Nov 24 '22 00:11

mhlz