Live data from Hacker News

Google, it's time – We want Scala for Android

blog.madhukaraphatak.com

131–140 of 148 posts

Re: Google, it's time – We want Scala for Android

#131
post #101

Over the last few months I've been writing Scala full time, and have even written some (demo grade) Android apps in it. My opinion is: Android should not adopt Scala as one of its primary languages. I think a platform's primary language should be accessible. It is an unfortunate fact that the stuff that most people only know about programming using some object oriented imperative language. People find it harder to ho…

> Scala can't even properly be a primary language in parallel to Java at the moment.

This is a very important point. There is a lot of ambivalence about Scala in the non Android world already, it's naive to think this ambivalence would completely go away on Android. The same problems that are crippling Scala's adoption in the non Android world will be present on Android.

Re: Google, it's time – We want Scala for Android

#132

The problem is that Scala generates very big jar files, which is why the only couple of Scala Android applications I've ever seen are toy apps. There is no doubt that any more sizeable project will blow up Dalvik's various restrictions like is already happening with Scala apps without ProGuard. There's also the fact that Typesafe doesn't care about Android so even if your current app works on Android, a future versio…

> The problem is that Scala generates very big jar files, which is why the only couple of Scala Android applications I've ever seen are toy apps. Yes, it's the same problem why compiling Scala to JavaScript is impossible ... oh wait! In both cases the standard library overhead is a few dozens of kB! The horror! That's why nobody is using Scala.js or Scala-on-Android for anything serious ... oh wait! That's already ha…

That's three strawmen in a row, none of them coming remotely close to addressing the point I made above.

The web (scala-internals, scala-users, stackoverflow) is filled with threads of people trying to run their Scala code on Android and being mystified by fatal errors from Dalvik or DEX generation simply dying on them.

Re: Google, it's time – We want Scala for Android

#133
post #103

Earlier quoted context omitted.

> Says who? Says at least me and the OP, and probably others... I haven't put a ton of time into learning Scala and only occasionally interact with it, but in that capacity I'd definitely say I find it a bit intimidating and someone hard to read. Certainly there are many ways to write Scala, and a Java-like style is doable, but idiomatic Scala, as far as I've seen, encourages terseness and the use of opaque punctuati…

Scala doesn't really have an idiomatic style. There's no "The Scala Way" to do things. What you've encountered are functional programmers who really love terse programming, but terse programming is no more idiomatic in Scala than Java-style programming. You can even keep the semi-colons and explicit type declarations if you want.

Yeah, I understand that, but I think (and this is probably the Python programmer in me talking) that there's value in encouraging a preferred way of writing a language that facilitates people reading each other's code. I want there to be an idiomatic style, and ideally that style would be relatively legible.

Re: Google, it's time – We want Scala for Android

#134
post #103

Earlier quoted context omitted.

Scala doesn't really have an idiomatic style. There's no "The Scala Way" to do things. What you've encountered are functional programmers who really love terse programming, but terse programming is no more idiomatic in Scala than Java-style programming. You can even keep the semi-colons and explicit type declarations if you want.

Yeah, I understand that, but I think (and this is probably the Python programmer in me talking) that there's value in encouraging a preferred way of writing a language that facilitates people reading each other's code. I want there to be an idiomatic style, and ideally that style would be relatively legible.

This is Scala. It has dependent type support and loops with global state. Basically, there's no unified community. No one agrees on anything, except that everyone else's code sucks.

Re: Google, it's time – We want Scala for Android

#135

Earlier quoted context omitted.

Scala is an immensely popular jvm language (as far as jvm langaugesg go). That's why it would be a good candidate.

Scala and Groovy both have about 2% mind share on the JVM. I wouldn't call that "immense".

Scala and Groovy are used for two totally different use cases. Scala is used instead of Java as a systems language for building systems, whereas Groovy is used as well as Java for testing Java classes or calling them from Grails. In theory we could use Groovy as the dynamic language for Scala, but because of its type inference and syntactic tersity Scala doesn't need a Groovy.

Re: Google, it's time – We want Scala for Android

#136

Earlier quoted context omitted.

> The problem is that Scala generates very big jar files, which is why the only couple of Scala Android applications I've ever seen are toy apps. Yes, it's the same problem why compiling Scala to JavaScript is impossible ... oh wait! In both cases the standard library overhead is a few dozens of kB! The horror! That's why nobody is using Scala.js or Scala-on-Android for anything serious ... oh wait! That's already ha…

That's three strawmen in a row, none of them coming remotely close to addressing the point I made above. The web (scala-internals, scala-users, stackoverflow) is filled with threads of people trying to run their Scala code on Android and being mystified by fatal errors from Dalvik or DEX generation simply dying on them.

Maybe this could change if Google helped, don't you think?

Re: Google, it's time – We want Scala for Android

#137

Earlier quoted context omitted.

That's three strawmen in a row, none of them coming remotely close to addressing the point I made above. The web (scala-internals, scala-users, stackoverflow) is filled with threads of people trying to run their Scala code on Android and being mystified by fatal errors from Dalvik or DEX generation simply dying on them.

Maybe this could change if Google helped, don't you think?

Of course, but it's obvious they have zero desire to help support Scala on Android. First because they don't use Scala at all internally and second because even the languages that they created (Go, Dart) are not supported on Android. If Android ever officially supports a language other than Java, you can bet it will be one of these two.

Re: Google, it's time – We want Scala for Android

#138

Earlier quoted context omitted.

Number 14 on Redmonk. http://redmonk.com/sogrady/2014/06/13/language-rankings-6-14... "The next JVM language to learn" (Java-focused survey): Scala leads comfotably with 47%. http://zeroturnaround.com/rebellabs/interview-with-typesafe-... Apart from that, you are completely missing the context. People are not looking for a random language, but for a language which is compatible with Java and Android, allows gradual m…

"Next language to learn" is the kind of metric you'd use if you don't have real numbers to your advantage. TIOBE lists Scala at 0.03% mind share, and you'll get similar numbers if you look at other metrics (see my post above). For Android, there are already more projects written in Kotlin and Clojure on Android than on Scala, so not sure why you think Scala is the "top contender". On top of that, Scala's upcoming ado…

You are really getting a bit desperate ...

Re: Google, it's time – We want Scala for Android

#139

Earlier quoted context omitted.

Please, let's be rational about this. A new language takes time to gain widespread use. Or are you telling me that Go, Scala, all account for nothing? We the developer community are in a transition phase. The advancements will become mainstream but it will take time. Scala is picking up pace like anything. This has been visible to anyone following the Scala ecosystem. Not in just programmer circles, the bombardment o…

Sure, languages take a very long time to gain adoption. Scala has been around for ten years and is still showing very little adoption while Clojure and more recently Ceylon are already receiving a lot of attention. I used to have very high hopes for Scala to become the next Java but at this point, I've moved on and hoping that another language will get that spot.

> while Clojure and more recently Ceylon are already receiving a lot of attention

That's a nice bubble you seem to live in.

Re: Google, it's time – We want Scala for Android

#140

Earlier quoted context omitted.

> The problem is that Scala generates very big jar files, which is why the only couple of Scala Android applications I've ever seen are toy apps. Yes, it's the same problem why compiling Scala to JavaScript is impossible ... oh wait! In both cases the standard library overhead is a few dozens of kB! The horror! That's why nobody is using Scala.js or Scala-on-Android for anything serious ... oh wait! That's already ha…

That's three strawmen in a row, none of them coming remotely close to addressing the point I made above. The web (scala-internals, scala-users, stackoverflow) is filled with threads of people trying to run their Scala code on Android and being mystified by fatal errors from Dalvik or DEX generation simply dying on them.

> The web (scala-internals, scala-users, stackoverflow) is filled with threads of people trying to run their Scala code on Android and being mystified by fatal errors from Dalvik or DEX generation simply dying on them.

No. Not even close.

There is exactly one known issue with Dalvik's limit of 64k methods, which requires running ProGuard before putting it on the app store (which is standard procedure for all apps).

This limit is hit by plenty of large apps.

Post reply on HN