4 ms·
It's very sad that our industry is so hype driven. Nothing really changed, you could write Android apps on Kotlin before, as well as on any other JVM language.
by yeasayer 9y ago
It's very sad that our industry is so hype driven.
Nothing really changed, you could write Android apps on Kotlin before, as well as on any other JVM language. But now "Kotlin is the hero".
I suspect that Google's adoption of Kotlin is just politics: JetBrains develops Android Studio for Google, so they pushed Kotlin as part of the deal. Google could acknowledge Scala years ago, but didn't, because Scala authors spend less time on bullshit politics and more time on actually improving the language.
Also, I don't understand the point of Kotlin. Clojure, Groovy and Scala are all very distinctive from each other and have their own niche. Kotlin is just a subset of Scala. Same thing, but less features. I guess it's NIH principle applied to JetBrains.
- jbooth 9y agoKotlin is a smart subset of Scala. Scala did a lot of things that pushed mainstream programming forward, but it's also crapped up with a lot of detritus, ideas that didn't work out, and ideas that were always obviously bad.
- v0lta 9y agoI totally agree. My main point against Scala is the mass of features, it's like a modern C++. In the worst case you end up with a dev team in which everyone codes in his very own style.
- jorgemf 9y ago> Kotlin is a smart subset of Scala Yes, it is only the subset you need, nothing else. That is why is here to stay and Scala not. Making the things more complex doesn't mean making them better. Do one thing, and do it right. Don't do a lot of things half good.
- pkolaczk 9y agoScala does all the features of Kotlin equally well, not half good. Actually Kotlin inherited a few bad ideas from Scala as well - which Scala already dropped like procedure syntax. And some features like null handling or coroutines in Kotlin are implemented as language features - special cases in the compiler, because the core of the language lacks abstraction mechanisms. This is making the language more complex than Scala. Scala: minimal and powerful language core, the rest is in libraries. Dotty: make this core even smaller Kotlin: take a powerful language like Scala, remove almost all of the unnique abstraction features, leave only "better Java syntax" and then reimplement missing features by special cases directly in the language instead of libraries. Feels like VB of XXI century.
- jorgemf 9y agoI have written Scala code and kotlin code, and it is much more legible the kotlin code. When I tried also there were problems calling Scala code from Java (I think there were problems with the type inference system that was giving me non-sense errors). Scala adds like 500kb to an Android app, kotlin only few kb. The compilation times are much faster with kotlin, the tooling support is also better. It is easier to become more productive with kotlin than with Scala. > Scala already dropped like procedure syntax Do you mean this?: https://groups.google.com/forum/#!topic/scala-internals/q1YX7NC1geM/discussion https://groups.google.com/forum/#!topic/scala-internals/q1YX... Kotlin does not do that. > some features like null handling or coroutines in Kotlin are implemented as language features null handling yes, and it is very well done. Coroutines so so, they added a couple of keywords to the language and most of the implementation is in the library. You can create your own coroutines: https://kotlinlang.org/docs/reference/coroutines.html https://kotlinlang.org/docs/reference/coroutines.html Go do coroutines quite good and they have also implemented in the language, why is it bad they use a couple of keywords for those special cases?
- pkolaczk 9y ago> Scala adds like 500kb to an Android app This is a lie. Please stop spreading these lies about Scala requiring a huge runtime. Scala runtime adds about 30 kB, which is nothing in 2017. > the tooling support is also better. Both use the same IDE from Jetbrains and both are officially supported. Hard to tell which one is really better, but Kotlin support has more issues in its bug tracker, despite being less popular :P > (nulls) it is very well done. It is not. It makes the type system more complex, and you can't abstract over optionals and other collection types. You also can't make your own flavor of optional-kinds, like Either or Try that would behave similar to the builtin nullability feature. The biggest problem with builtin features is that you can't make your own slightly different ones. You're at mercy of one company controlling the language. With a smaller language + libraries, you can always fork a library and do modifications.
- swsieber 9y agoI see Kotlin as a fixed Java, not a subset of Scala. While both may be true views, I think the "fixed Java" view explains the drama behind the announcement. Kotlin is better at being Java than Java is. Scala is not.
- hhandoko 9y ago> Nothing really changed, you could write Android apps on Kotlin before, as well as on any other JVM language. But now "Kotlin is the hero". The announcement shows Google making a commitment to make Kotlin successful in Android, rather than leaving the effort all to the community and JetBrains. > I suspect that Google's adoption of Kotlin is just politics: [...] Google could acknowledge Scala years ago, but didn't [...] I think this post explains it best: https://medium.com/@ScalaWilliam/why-scala-didnt-miss-the-android-opportunity-92eaaf63c339 https://medium.com/@ScalaWilliam/why-scala-didnt-miss-the-an... . In regards with the Scala evolution, there's a lot of things to be excited about. In the near term, 2.13 should see various optimisation to core libraries and faster compilation. > Also, I don't understand the point of Kotlin. [...] Kotlin is just a subset of Scala. [...] Kotlin is a better Java, whereas Scala is much, much more. Scala is still my go-to JVM languages, but one Kotlin use case for me is to write libraries that will be called from Java [1]. Its biggest advantage is that it's succinct, has useful functional features (e.g. Scala-like collections), while producing code signatures that's very close to Java. Notes: [1] - https://github.com/builtamont-oss/cassandra-migration https://github.com/builtamont-oss/cassandra-migration
- throwasehasdwi 9y agoScala has the same problem as java. Too many different opinions on how to do things. Too much cruft and ways to shoot yourself. I see Kotlin as a clean-up job of a lot of syntax design flaws in java.
- H_Romeu_Pinto 9y agoThe funniest part is how much this discussion sounds like the Java vs. Perl on web programming from decades ago. In the end it is just politics. What will make a framework or language succeed is how influential its sponsors are (e.g.: IBM -> Fortran & Cobol, ATT -> C, MS -> Basic & C#, Sun -> Java, Google -> Python, MS & ATT -> C++, Apple -> ObjectiveC). The ideological arguments are just decoration, fancy wrapping and cosmetics to convince people to buy the thing. If language "quality" alone was enough to win adepts, both Smalltalk and Lisp would be among the top 10 most used. Kotlin might be better than Java, in the same sense a Dvorak keyboard might be better than a qwerty. But it doesn't seem better enough to force old Java dogs to care for new tricks. Edit: typos.
- zzalpha 9y agoBut it doesn't seem better enough to force old Java dogs to care for new tricks. Don't count on that. I'm an old dog when it comes to Java. But I decided to give Kotlin a try on a little pet project of mine. JetBrains are mad geniuses. In Intellij, with a hotkey you can convert Java to Kotlin. A couple of Alt-Enters and you have something almost idiomatic. I converted the entire (small) project in an hour and then spent a bunch of time reworking parts to take advantage of Kotlin's functional features. And I could convert incrementally and test each migration because the Java interop is absolutely seamless. They've completely eliminated the risk and friction of trying the language out. I even found a bug along the way due to Kotlin's null checker. It's brilliant! JetBrains gets it. They produced a language that's new yet familiar (sorry Clojure), powerful yet still easy to understand (sorry Scala), and has essentially zero barrier to entry due to interop and tooling support.
- pkolaczk 9y ago> JetBrains are mad geniuses. In Intellij, with a hotkey you can convert Java to Kotlin. A couple of Alt-Enters and you have something almost idiomatic. The same works for Scala. > powerful yet still easy to understand (sorry Scala) Kotlin is way less powerful than Scala. And if you dumb down Scala to Kotlin level by just not using the more advanced features (it is easy to turn them off globally), you're basically writing Kotlin. I can't see how Scala is less readable then - the differences are really cosmetic.
- deleted 9y ago[deleted]
- zzalpha 9y agoAlso, I don't understand the point of Kotlin. Clojure, Groovy and Scala are all very distinctive from each other and have their own niche. Kotlin is just a subset of Scala. Uh. Yeah. Exactly.
- gregpardo 9y agoEver tried to code a robust Android app in Scala? It's a nightmare. Kotlin you just plugin and you can convert your source files very easily. I would agree syntax is not that much different but the compatibility is.