News for hackers. Stuff that matters.
Re:Kotlin 1.0.5 is here by dxxvi on Tuesday November 08, 2016 @03:41PM (#12903729)
Is there anybody switching from Scala to Kotlin?
Re:Kotlin 1.0.5 is here by runT1ME on Tuesday November 08, 2016 @03:48PM (#12903788)
I can't imagine anyone who has used Scala for long would switch to Kotlin. Kotlin is 'Java++'. Scala is a fully featured functional language.

Kotlin is missing all of the most powerful Scala features. No type classes, monadic comprehension, higher kinded types, adhoc polymoprhism. :(

Re:Kotlin 1.0.5 is here by V-2 on Tuesday November 08, 2016 @08:02PM (#12905328)
Well, it's kind of the point. Kotlin is supposed to be light weight and easy. Besides, using Scala for Android, while possible, is cumbersome. Kotlin wins this one hands down.
Re:Kotlin 1.0.5 is here by lmm on Wednesday November 09, 2016 @04:14AM (#12908373)
Scala for Android is fine. The only thing that makes it harder than Kotlin is JetBrains disingenuously shipping their Kotlin plugin but not their (more popular) Scala plugin by default, which they could fix tomorrow if they wanted to.
Re:Kotlin 1.0.5 is here by V-2 on Wednesday November 09, 2016 @04:49AM (#12908677)
Last I checked, Kotlin plugin isn't installed (in Android Studio) by default. Are you referring to IntelliJ Idea?

I tried to use Scala for Android in the past and I gave up after attempting to set it up for a few hours. Admittedly it was a while back, perhaps things have improved.

Your claim that Scala on Android works fine got me interested again, so I googled around, found that blog post from May this year (that's more recent than my own experiments), and apparently there are still hurdles: http://blog.scalac.io/2016/05/19/reflections-on-starting-and...

With this type of issues the thing that I'm wary about is not getting a "hello world" app to compile once, but that I can get a project up and running, then need to add something else to the equation (say, a DI, or some code processor), and things fall apart again in an X-Files fashion.

I've heard that Scala has long build times, too, but maybe it's a thing of the past as well - no first-hand experience here as I never got to that stage.

Re:Kotlin 1.0.5 is here by simono on Wednesday November 09, 2016 @10:50AM (#12911027)
The article isn't very good, even the link to the 'official' page is outdated.

Just use sbt-android and skip all the other nonsense.

Compilation is impressively fast, as the plugin uses the information from incremental compilation to skip ProGuarding completely for things that haven't changed.

Re:Kotlin 1.0.5 is here by Apocryphon on Tuesday November 08, 2016 @06:18PM (#12904851)
Not everyone needs a functional language.
Re:Kotlin 1.0.5 is here by gregschlom on Tuesday November 08, 2016 @04:19PM (#12904022)
After having so much fun with Kotlin, I tried switching to Scala and quickly switched back. Scala seems too complicated, with a steep learning curve. Implicits all over the place made it hard to read code and understand what was going on.

I do like many of the more powerful features that Scala has, but Kotlin strikes a right balance of simplicity and power in my opinion.

Re:Kotlin 1.0.5 is here by runT1ME on Tuesday November 08, 2016 @04:39PM (#12904179)
As a really big Scala fan, I can say Kotlin is probably the right choice when it comes to doing Android development.

That being said, yes Scala has a steeper learning curve than say, Kotlin or Go. But if you're going to devote the I don't know, next ten years of your life to working in a particular language, does it really matter if it takes two months vs. four months to ramp up?

Re:Kotlin 1.0.5 is here by mhd on Wednesday November 09, 2016 @04:36AM (#12908581)
In the mobile space, I see a lot of "also ran" languages, never mind the platform. I don't think people who wrote iOS apps were much intent on using Objective-C outside of that, and I don't think Swift will improve much on this. A lot of Android developers fall into the same niche: They're using Java because they have to, not because it's their major background. So anything that makes their side errands into Android-land easier is welcome (cf. react-native).

Plenty of "ok-ish, but not too hard to learn" languages proliferate in that kind of climate, like go for small web services (where Erlang was too much of an investment). The Unix approach of 1001 ad hoc sub-languages (awk, pic, ed...) adapted.

Quite different from e.g. a J2EE developer's approach, who tends to think of career-defining technologies and languages, where Scala seems like a wise investment.

Re:Kotlin 1.0.5 is here by zem on Tuesday November 08, 2016 @07:58PM (#12905316)
i think redhat's ceylon strikes my personal sweet spot between java and scala, but kotlin is a great language too.
Re:Kotlin 1.0.5 is here by relics443 on Tuesday November 08, 2016 @04:03PM (#12903917)
If they're using it for Android development they should. Kotlin has just about first class support for it, while Scala is a pain to get working.
Re:Kotlin 1.0.5 is here by hota_mazi on Tuesday November 08, 2016 @04:56PM (#12904303)
Also, the latest version of Scala doesn't work on Android since it requires Java 8.
Re:Kotlin 1.0.5 is here by simono on Tuesday November 08, 2016 @05:05PM (#12904369)
Which issues did you experience?
Re:Kotlin 1.0.5 is here by pjmlp on Wednesday November 09, 2016 @02:55AM (#12907409)
Kotlin:

1 - Install plugin into Android Studio

2 - Configure the Gradle plugin

Enjoy Android development within Studio.

Scala:

Follow this several pages long tutorial:

https://www.voxxed.com/blog/2016/10/setting-up-scala-on-andr...

Try to enjoy while working around issues with Studio integration and common Android libraries.

Re:Kotlin 1.0.5 is here by simono on Thursday November 10, 2016 @04:11PM (#12924394)
I wonder how people come up with these pointless, overcomplicated tutorials...
Re:Kotlin 1.0.5 is here by cryptos on Wednesday November 09, 2016 @10:44AM (#12910984)
I've used both, Scala and Kotlin, and I like Kotlin very much.

A programming with more features is not necessarily better. The limited features of Kotlin (compared to Scala) are an advantage, if you change your point of view. Some advantages:

  * easier to learn (a Java dev will be more productive than in Java in a day or two)
  * easier to maintain since Kotlin doesn't allow so much hard to understand code constructs
  * fewer discussions about the one true style or way to do something
  * it's easier to build good tooling
  * much faster compilation
  * smoother Java interop
  * performance implications are more predictable