Live data from Hacker News

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

blog.madhukaraphatak.com

91–100 of 148 posts

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

#91
post #2

I agree that Google should add more languages to android. And while Scala is a great language, it's very complex - so it won't benefit many of the less skilled users. A better language would be something with the simplicity and power of python, but with good performance.Groovy could be one such language.

Scala is not complex in terms of the language design. Most of features [or complexity] come from the libraries.

Implicits? Compared to Java, Scala is not a simple language. I'd say Scala's complexity is on the order of Haskell + Java syntax with additional glue on top of that.

Not to say this is bad, it just means you need greater discipline when writing software in Scala. A bit like C++ (yes, I went there! :-)).

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

#92
post #89

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…

> but idiomatic Scala, as far as I've seen, encourages terseness and the use of opaque punctuation-laden operators This is not idiomatic Scala. http://docs.scala-lang.org/style/naming-conventions.html#sym... > Avoid! [...] As a general rule, symbolic method names should be well-understood and self documenting in nature. The rule of thumb is as follows: if you need to explain what the method does, then it should have…

I think this is actually the crux of the issue. The language gives you enough rope to hang yourself with, and when people do hang themselves with it, those who look in from the outside throw the baby out with the bathwater.

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

#93

Why do people think that Swift has a managed runtime with garbage collection? It has reference counting, it's compiled into native code. It has a small runtime lib. linked into the executable (but hey, even C executables have it).

The younger generations grew with VM based implementations, never learned the memory safe system programming languages that lost the market to C and C++ and lack compiler design understanding.

As such, any language they see announced as safer than C and C++ must be VM based.

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

#94
post #89

Earlier quoted context omitted.

> but idiomatic Scala, as far as I've seen, encourages terseness and the use of opaque punctuation-laden operators This is not idiomatic Scala. http://docs.scala-lang.org/style/naming-conventions.html#sym... > Avoid! [...] As a general rule, symbolic method names should be well-understood and self documenting in nature. The rule of thumb is as follows: if you need to explain what the method does, then it should have…

I think this is actually the crux of the issue. The language gives you enough rope to hang yourself with, and when people do hang themselves with it, those who look in from the outside throw the baby out with the bathwater.

I think that's definitely it. That old Dispatch periodic table has done a lot of damage to Scala's reputation IMO (even though it's no longer used by Dispatch).

Looking at the major Scala libraries and frameworks today, I don't see a ton of symbolic operators in use. Akka just has ! and ? (both of which have very obvious uses once you understand actors), Play only uses them for iteratees (which most devs will never have to think about, plus it provides named equivalents for all of them), SBT has been cutting back. Outside of scalaz, the problem seems to be under control.

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

#95
post #21

Earlier quoted context omitted.

Just because Scala has features that are tricky to get your head around if you're not familiar with functional programming, it doesn't mean it's complex to write software in. You can write Scala that's basically Java with less syntax if you want. I think that's what's so great about Scala, Python and other languages that mix OO and functional elements; you don't have to throw away Java and pick up Haskell, you can st…

It still doesnt change the fact that Scala, as a programming language, tries to incorporate too many concepts while still trying to be typesafe. This makes the language complex, and not an ideal candidate.

The replies against you suggest solutions on an individual level, as in the problem being one of too many concepts for the individual. I suggest the problem is not too many concepts for the individual, but for a team.

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

#96

I'm not sure the author understands why Java is the language in the first place - there is an army of developers who knows how to use Java. Yeah, it might not be the best language ever, but neither is C++ and neither is Scala. For what Google is doing their choices were basically C++ or Java, there is no other embedded, performant option that hits mass quantities of developers worldwide. Every other language is eithe…

I think WebOS was going to use JavaScript.

The thing about Java and C++ is that they themselves are around for historical reasons. Far better languages have already been proven out. But, it will take a major industry player to move the masses forward on this. Apple's Swift effort gives hope on this.

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

#97
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 version of the compiler might make it blow up on the phone after you recompile it.

Unfortunately, the Ceylon team doesn't seem to be interested in supporting Android either.

Which leaves Kotlin, as a reasonable option for non-Java development on Android.

At any rate, don't expect any help from Google about Scala, they're not even supporting their own non-Java languages there (Go, Dart).

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

#98
post #96

I'm not sure the author understands why Java is the language in the first place - there is an army of developers who knows how to use Java. Yeah, it might not be the best language ever, but neither is C++ and neither is Scala. For what Google is doing their choices were basically C++ or Java, there is no other embedded, performant option that hits mass quantities of developers worldwide. Every other language is eithe…

I think WebOS was going to use JavaScript. The thing about Java and C++ is that they themselves are around for historical reasons. Far better languages have already been proven out. But, it will take a major industry player to move the masses forward on this. Apple's Swift effort gives hope on this.

> Far better languages have already been proven out

For what they do, C and C++ don't really have serious challengers yet, not that there aren't some promising contenders.

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

#99
post #44
post #28

Who's "we"? How about we ask Google to focus on things the vast majority of Android developers actually want? Java 7/8 comes to mind. Even if we're looking for just an alternative Android dev language Scala probably wouldn't even be in the top 10.

What matrix are you using where Scala wouldn't make it in top 10? I would bet it would be one of the top choices.

All the various language surveys that have come up these past months (RedMonk, TIOBE, job boards, github popularity, etc...) put Scala in a distant #30-50 slot. Certainly not in the top 90% mainstream languages.

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

#100

Earlier quoted context omitted.

As a new Android developer Scala wouldn't remotely have come to my mind as a feature I wanted anytime soon. The Android Studio is still in beta, the ability to test different platforms with the simulator is less than great (poor) experience still on a MacBook Pro, and the vast majority of developers come out with iOS versions of their products before Android. Those three alone need massive attention before I would ev…

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".
Post reply on HN