3 ms·
Kotlin folks seem to mostly care about Java as bootstrap to their own ecosystem. The anti-Java bias, against the platform that made it possible in first place
by pjmlp 10mo ago
Kotlin folks seem to mostly care about Java as bootstrap to their own ecosystem.
The anti-Java bias, against the platform that made it possible in first place and got JetBrains a business, is quite strong on Android, fostered by the team own attitude usually using legacy Java samples vs Kotlin.
- pianoben 10mo agoAndroid folks have good reason to have anti-Java bias. Their bias, as it happens, is against old Java, which they are constrained to use as fallout from the Oracle lawsuits of yore. Kotlin breathed new life into Android in a meaningful way. On backend teams, I've not personally encountered much anti-JVM bias - people seem to love the platform, but not necessarily the language. (yes I know there's desugaring that brings a little bit of contemporary Java to Android by compiling new constructs into older bytecode, but it's piecemeal and not a general solution)
- pjmlp 10mo agoLies, damm lies. They cherry pick whatever they feel like from OpenJDK. And even though Oracle was right, given that Android is Google's J++, in this case they had better luck than Microsoft. They don't take more from OpenJDK because then their anti-Java narrative doesn't work out. But there is some schadenfreund, to keep Kotlin compatibility story relevant they are nonetheless obligated to keep up with is mostly used on Maven Central, thus the updates up to Java 17 subset.
- pianoben 10mo agoMaybe I'm wrong about the state of Java in Android today - it's been a few years since I did that work full-time. But I do remember when Kotlin broke on to the scene in 2015, and most of us were thrilled to finally move beyond Java 7! The embrace of a non-Java language was grassroots and genuine; Google's adoption came several years later. J++ though, now that is a blast from the past! I think I still have a J# book from my student days, somewhere :)
- andrekandre 10mo ago> But I do remember when Kotlin broke on to the scene in 2015, and most of us were thrilled to finally move beyond Java 7! n=1 but i was there with android studio v0.01 (or thereabouts) using kotlin for a production app cause i was so sick of old-java + eclipse... google was asleep at the wheele imo and android development would be nowhere near where it is today without jetbrains
- pjmlp 10mo agoCompared to Apple and Microsoft, Android development is mostly outsourced. None of the development environments is from Google, none of the languages as well, or the build tools for app developers (Internally they use Bazel and Soong). Naturally having gone into bed with JetBrains for the IDE, after leaving NDK users without IDE tooling for almost two years during the IDE transition, the deal was in place to push Kotlin as well. I am surprised Google hasn't yet bought JetBrains.
- andrekandre 10mo ago> I am surprised Google hasn't yet bought JetBrains. same, but i just guess google doesn't know what they would do with them outside of supporting android > Compared to Apple and Microsoft, Android development is mostly outsourced. its true, but i wish apple worked harder on their ide because its so barebones compared to jetbrains its not even funny
- wiseowise 10mo ago> I am surprised Google hasn't yet bought JetBrains. Why would they? It’s the best of both worlds. They can pay a fraction of the price while having 100% of the benefits.
- mike_hearn 10mo agoRumour has it Google tried many times but JetBrains isn't for sale.
- pjmlp 10mo ago
- tadfisher 10mo agoThis is needlessly divisive. JetBrains does not owe two-way interop to the Java ecosystem. There are many Kotlin features that do not have clean interop with Java; Compose, coroutines, and value classes come to mind. And it turns out that this mostly benefits Java, because these features are not built with the kind of engineering rigor that Java language features enjoy, and some of these features would behave way better with support in the VM anyway. Where it makes sense, they are already moving closer to Java/JVM-native feature implementations; for example, data classes already have two-way support via records, and value classes are almost there (waiting on Valhalla GA). Besides, wouldn't you want this stuff represented in the Java type system anyway? Otherwise you get the Lombok problem, where you have this build dependency that refuses to go away and becomes a de facto part of the language. Result<T, E> is not quite the same as rich errors which explicitly are not representable by user types.
- pjmlp 10mo agoI know it is divisive, yet many Kotlin folks don't appreciate the platform that makes their ecosystem possible in first place. From all the JVM guest languages, possibly fostered by Android team, they are the most anti-Java ecosystem. Clojure folks appreciate being a hosted language, Scala is kind of they would rather have Haskell but still JVM is kind of cool, Groovy was usually a way to script applications. Kotlin, well those behave as if ever the JVM would be one day rewriten in Kotlin, they have Android for that. The features you mention will never be supported in Android by the way, at least I don't believe Google will ever bother to do so.
- rhdunn 10mo agoI view the relationship between Kotlin and Java like that between C++ and C. The two-way interop is one of Kotlin's advantages as it makes porting code from Java to Kotlin easier, or using existing Java libraries. For example, you don't have/need something like Scala's `asJava` and `asScala` mappers as the language/standard library does that mapping for you. The interop isn't always perfect or clean due to the differences in the languages. But that's similar to writing virtual function tables in C -- you can do it, and have interop between C and C++ (such as with COM) but you often end up exposing internal details.