6 ms·
Kotlin could he better, but doesn't go all the way. Without HKTs and implicit injection, Java is going to eat its lunch. Java already has records, type inferen
by jackcviers3 5y ago
Kotlin could he better, but doesn't go all the way. Without HKTs and implicit injection, Java is going to eat its lunch. Java already has records, type inference, parametric null safety with Optional, Loom provides coroutines, vavr and streaming apis have given us theabilitytodo FP... what's left as a unique feature?
Kotlin will survive because it was picked for Android to avoid copyright issues. But the difference between the two languages is vanishing small.
- blacktriangle 5y agoCould you clarify the point on Android and copyright issues? At least at the time in 2017 when Google blessed Kotlin as an officially supported language, it seemed like the reasoning was Kotlin was far more ergonomic than Java. How does copyright come into this?
- alcidesfonseca 5y agoOracle suited Google for copying the APIs (not the implementation) of the Java standard APIs. It all started in 2010 [0] Kotlin was Google's backup if the suit went Oracle's way. [0] https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_Inc https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_....
- blacktriangle 5y agoI guess given the recent court ruling we should see if Google sticks with Kotlin as a hedge, sticks with Kotlin because the community has embraced it, or pulls away from Kotlin as a no longer needed source of extra work.
- jcadam 5y agoIt's Google. They'll probably come up with a completely new programming language which they'll force on the community in some ham fisted way, then suddenly drop it in a few years when they can't figure out a way to massively monetize it.
- mhoad 5y agoI thought that was Dart. Which is honestly a shame because it’s a genuinely great language. But it does very much fit the bill otherwise
- cutler 5y agoNot really. Dart is single-threaded which was a mistake Google made in trying to keep it JS-compatible. If Dart had been multi-threaded from the start it might have stood a chance.
- blacktriangle 5y agoDart always stuck me as a solution looking for a problem, particularly in lite of more recent progress in JS itself. Can I ask why you think its a genuinely great language worth looking at?
- pvorb 5y agoI'm no expert in the Android ecosystem, but I think it was primarily a good choice for giving devs features they wanted to have while the underlying runtime and standard library got stuck at Java 6. The reason why they are still on Java 6 might have to do with the law suit, though.
- nine_k 5y agoWhen Java gets the Kotlin's brilliant "last argument of lambda type can be a block", let me know. It allows to massively extend the perceived syntax of the language where needed, and create nice, typechecked DSLs. A number of small ergonomic improvements is also impossible to port to Java. And I'm definitely happy that Java does not feature implicit injection, which looks so cool but is so painful to work with in Scala. When I need HKTs, I can pick a perfectly good Haskell :) I'm afraid Java or even Kotlin will never achieve this level of FP-ness; for that, a language should be designed differently. Rust, OTOH, likely will.
- cutler 5y agoAgreed re Scala's implicits. They've just repackaged them for Scala 3 as given/using but it's the same confusing nonsense that drove me away from the language.
- cutler 5y agoDream on. Java, even including upcoming features, has nowhere near what's included in Kotlin out of the box. Nullability? Extension methods? First class functions? I could go on. Kotlin is much more than a better Java.