Early Impressions of Kotlin
natpryce.com
natpryce.com
> We wanted a typed language. We wanted language aware editing. And we wanted a language that had an organisation behind its development [Typesafe] and enough people using it that we could get questions answered...a more active community, is being used for commercial development by...a number of other companies [Twitter, Foursquare, The Guardian], has good editing support within IntelliJ, has an active community on social media, and promises easy interop with existing Java libraries.
Scala also shares most of the "good points"
* is interoperable with Java
* infers types
* has more advanced variance rules
* has data classes
* has sealed classes
* has a mechanism for extension methods
* has operator overloading (though Scala operators are syntactic sugar for methods, so arbitrary names are allowed)
* has getter and setter syntax
And solves many of the "surprises"
* destructuring
* data classes that can be sealed
* better null handling (i.e. Options)
* structural typing
And of course, Scala has a larger, more mature community, broader support from IDEs and build tools, compile-to-JS abilities (ScalaJS), and many more open source libraries and frameworks.
The author mentions that build times are slow. Was compiler performance the singular deal-breaker?
I'm not saying I can't think of any downsides of Scala; after three years of full-time development, I've seen a few. (Yep, slow compile times. Also, conceptual complexity. Also anything in the bug tracker. https://issues.scala-lang.org .) But I left the article feeling like Kotlin was a fasting compiling Scala that was less mature and had fewer features. I'd enjoy a fuller perspective on Scala from a Kotlin dev.
---
Side note: "Kotlin borrows the concept of companion objects from Scala. Why can’t classes be objects? Perhaps it’s a limitation of the JVM but compared to, say, Python, it feels clunky."
I'm guessing this is referring to using compile-time types (classes) as runtime data? I.e. reflection.
Also IDE support of kotlin is really good through IntelliJ. What I mostly dislike about kotlin is that they tried to have something like ScalaJS but they couldn't really make a "good" version in 1.0