5 ms·
Kotlin wasn't developed for Android. And can be run anywhere. It was JetBrains pet project to fix archaic stuff in Java without making a Scala. It was designed
by Illniyar 3y ago
Kotlin wasn't developed for Android. And can be run anywhere.
It was JetBrains pet project to fix archaic stuff in Java without making a Scala. It was designed from the get go for a wide base (as wide as java).
I'm not sure how it became Android's main target, but I doubt it was the original purpose.
- jszymborski 3y agoFurther to that point, Kotlin mainly targets the JVM (which can run pretty much everywhere), but also can be compiled to JavaScript, LLVM, and a bunch of other targets. Honestly the only times I've evaluated Kotlin for personal projects was bc of that flexibility.
- singularity2001 3y agorecently kotlin can even be used to compile to native and wasm, but gradle makes it almost less usable than swift
- pjmlp 3y agoWith various levels of implementation quality, Kotlin/Native had to be rebooted, on JS it hardly offers anything better than TypeScript, on the JVM it is mostly used by Android shops anyway.
- radley 3y agoI think everyone jumped from Java to Kotlin due to Oracle suing Google over Java in Android. It also provided a huge opportunity to be more deliberate since Android was maturing.
- nazgulsenpai 3y agoOracle sued Google over the Android's implementation of Java's API. Kotlin still uses those APIs as it is compiled to Java bytecode on Android.
- pjmlp 3y agoThat is an urban myth. If that was the case, they would have adopted Dart instead of keeping an high dependency on the Java ecosystem for Android. Android Studio, Gradle, Kotlin compiler, the libraries that Android depends on from Maven Central, all Java.
- pjmlp 3y agoBecause Google and JetBrains are in bed together in what concerns Android development tooling. Try to use Kotlin without the Android ecosystem, it is just syntax sugar for the JVM.
- philwelch 3y agoJava is just syntax sugar for the JVM too, it's just that Kotlin is a better one.
- deaddodo 3y ago> Kotlin wasn't developed for Android. And can be run anywhere. I agree and would go so far as to say that Dart is a better comparison to Swift than Kotlin is.
- balder1991 3y agoIt was adopted on Android quite fast after Jetbrains made the integration in Android Studio almost flawless, partly because back then the Android runtime was stuck on the Java 6 syntax plus some syntax sugar that the IDE provided to mimic lambda functions. It helped a lot that I think Jetbrains took advantage of all they could to make development in Kotlin very smooth, I remember back then people joked how Kotlin worked so flawlessly on Android Studio almost like it was the main language while on Xcode Swift was slow, the highlight would stop working constantly, refactoring was not supported, often indexing the project would hang forever etc.