TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Early Impressions of Kotlin

27 pointsby jaxonduover 9 years ago

1 comment

paulddraperover 9 years ago
The author&#x27;s criteria sounds like a brochure for Scala development.<p>&gt; 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.<p>Scala also shares most of the &quot;good points&quot;<p>* is interoperable with Java<p>* infers types<p>* has more advanced variance rules<p>* has data classes<p>* has sealed classes<p>* has a mechanism for extension methods<p>* has operator overloading (though Scala operators are syntactic sugar for methods, so arbitrary names are allowed)<p>* has getter and setter syntax<p>And solves many of the &quot;surprises&quot;<p>* destructuring<p>* data classes that can be sealed<p>* better null handling (i.e. Options)<p>* structural typing<p>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.<p>The author mentions that build times are slow. Was compiler performance the singular deal-breaker?<p>I&#x27;m not saying I can&#x27;t think of any downsides of Scala; after three years of full-time development, I&#x27;ve seen a few. (Yep, slow compile times. Also, conceptual complexity. Also anything in the bug tracker. <a href="https:&#x2F;&#x2F;issues.scala-lang.org" rel="nofollow">https:&#x2F;&#x2F;issues.scala-lang.org</a> .) But I left the article feeling like Kotlin was a fasting compiling Scala that was less mature and had fewer features. I&#x27;d enjoy a fuller perspective on Scala from a Kotlin dev.<p>---<p>Side note: &quot;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.&quot;<p>I&#x27;m guessing this is referring to using compile-time types (classes) as runtime data? I.e. reflection.
评论 #10831189 未加载
评论 #10830337 未加载