5 ms·
Yes. Kotlin is good, but there is a lot of Java out there that needs to be supported. Have you experimented with converting entire projects of Java to Kotlin?
by bluejekyll 5y ago
Yes. Kotlin is good, but there is a lot of Java out there that needs to be supported.
Have you experimented with converting entire projects of Java to Kotlin?
- The_rationalist 5y ago
- halpert 5y agoWhy would you convert the entire project to Kotlin? It’s trivial to mix the two languages, and in fact most Kotlin applications depend on Java libraries.
- pjmlp 5y agoJet Brains seems to want ot create an ecosystem of their own, Kotlin still depends on Java is more accurate.
- halpert 5y agoI don’t think that’s true. One of the biggest use cases for Kotlin is Android development. Interop between Kotlin, Java libraries, and the Android SDK is completely seamless.
- 62951413 5y agoIt's hard to be certain but we have seen this story in Scala. Among the advantages advertised early was interoperability with Java and access to its huge ecosystem. In practice the Scala ecosystem is completely different (well, Akka is a special case popular in Java projects too). As a trivial example people would rather use ScalaPB instead of officially supported Java library. When I worked on a Kotlin-based system people were adamant to use github.com/JetBrains/Exposed. Which had a couple pages of documentation and was missing features. And then again there's politics. Big/successful companies always end up re-inventing PL wheels. The whole GOOG/ORCL mess gave GOOG incentive to fragment the Java ecosystem too.
- halpert 5y agoOk that’s Scala… Kotlin is already the primary language for all new Android applications. The interop story with Java is unambiguous: Kotlin works well with Java. For instance, Android didn’t rewrite most of their SDK in Kotlin, yet it works just fine. Popular Java libraries like Spring and Dagger work with Kotlin. It really “just works”.
- stepbeek 5y agoI switched from Scala because I found the interior to be so good. Calling Java from kotlin is easy, and - unlike Scalia - the inverse is also true. I’ve converted several projects from Java to kotlin incrementally and it’s been very smooth.