Hacker News new | past | comments | ask | show | jobs | submit login

But it's way easier to set up than Scala (for Android), at least out of my experience. It works well and nearly out of the box in Android Studio; after all, it comes from the same company that does IntelliJ, which AS is based on. Not such a bad support in terms of tooling.

I wouldn't advocate it for production yet, I agree. I started using it for personal projects, though, and so far its lack of maturity mostly shows in documentation and harmless quirks. Not outright bugs.

It's 100% interop ensures that you can only implement bits and pieces in Kotlin, not necessarily the entire app. So you don't have to jump into it head first and commit yourself entirely.

Personally I would use it for bussines logic where the lack of LINQ / Streams / lambdas is hurting code readability. It is also very useful for plain data objects, since it removes so much of Java's verbosity.

Scala has got more things that Kotlin, there is a comparison of features: http://confluence.jetbrains.com/display/Kotlin/Comparison+to...

But I'm already happy with the advantages Kotlin has over old Java, Android's Java. It's fancy enough.




> But it's way easier to set up than Scala (for Android), at least out of my experience. It works well and nearly out of the box in Android Studio; after all, it comes from the same company that does IntelliJ, which AS is based on. Not such a bad support in terms of tooling.

In IntelliJ at least, Scala "just works" out of the box. And IntelliJ is the tool that you'd expect to have the best Kotlin support, since as you say it's made by the same people. What about third-party tools - New Relic, or Takipi? What about third-party frameworks? (e.g. there's a wicket-scala project - it's not perfect but it takes a lot of the pain out of interop. I haven't used spring-scala but it seems like the same kind of thing)

> It's 100% interop ensures that you can only implement bits and pieces in Kotlin, not necessarily the entire app. So you don't have to jump into it head first and commit yourself entirely.

Scala's interop is actually more complete than Kotlin's - without existential types you can't express some types that it's possible to write in Java (e.g. nested bounds like <? extends T<? super...).

> But I'm already happy with the advantages Kotlin has over old Java, Android's Java. It's fancy enough.

If there were maturity or ecosystem advantages to Kotlin then I'd agree - after all, that's the reason I use Scala rather than Idris :P. But like I said, it seems to come with all of Scala's disadvantages, and fewer of the advantages.

And there's an element of the "blub paradox"; when I first started using Scala I wrote code that was more or less "Java without semicolons". Then I started using options. Then I started using case classes. Then I discovered that I could use the for/yield syntax to express some "wrappy" problems much more elegantly. Then I needed to make this work for collections, and I could abstract that. Then I discovered I could reuse the same code to handle a bunch of different abstractions, and that Scalaz already contained the most useful ones. And so on. Even today (after four years in the language) there are corners of Scalaz where I fear to tread, but at this point I'm confident that I'll need them sooner or later.


> In IntelliJ at least, Scala "just works" out of the box

Not for Android, unfortunately.

There are plugin issues and it doesn't cooperate with Gradle all that great. I admit that I wasn't able to set it up :) okay, I wasn't hellbent on it and didn't try for days, but it was a bummer.

Otherwise I'd be using Scala gladly - after all, you can write Scala for living, while I don't expect Kotlin to appear in job ads anytime soon.


The sooner Gradle and Android Studio lets us to use Scala or any other language we want for configuration, the better. I don't like being told I have to use Gruvy because I want a nicer DSL than XML when virtual every programming language has nicer syntax than XML.


Fair enough. When I last worked on Android it was all eclipse/maven-based, and using Scala was as simple as just doing the obvious thing (I mean, you had to install the relevant plugins, but that was all). Shame if they've lost that in the move to Android Studio.


> It's 100% interop ensures that you can only implement bits and pieces in Kotlin, not necessarily the entire app.

As long as Kotlin is not identical to javac, there is and never will be 100% interop.

> Scala has got more things that Kotlin, there is a comparison of features: http://confluence.jetbrains.com/display/Kotlin/Comparison+to....

While this is a valid point (although the comparison is probably outdated) we should keep in mind that years ago, Scala 1.0 (or something like that) was were Kotlin might be today.

There are reasons why Scala evolved from a "better Java".




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: