Google, it's time – We want Scala for Android
71–80 of 148 posts
Re: Google, it's time – We want Scala for Android
#72Re: Google, it's time – We want Scala for Android
#73I want Python for Android. Ideally, it would compile to Dalvik/ART or ARM. It would use something like PySonar to infer types or use annotations to be able to use native types when possible (for speed & correctness). When the type isn't given or can't be deduced, it would fallback to boxed objects (like Nuitka does, in the way the offically C-Python keeps its objects in memory). But that is not neccessary, all that i…
Best you'll get, and quite good.
Re: Google, it's time – We want Scala for Android
#74In theory, it should be possible to write code on the Android platform using any JVM language. Groovy, Scala, Clojure, Kotlin, etc. There are hiccups to that right now but you can hack your way to it generally.
But Android's APIs are going to stay in Java. That is a lot different than Apple's move to Swift, where the platform itself is moving to the new language.
Re: Google, it's time – We want Scala for Android
#75Re: Google, it's time – We want Scala for Android
#76It is not going to happen. Google IO 2014, Android development fireside: https://www.google.com/events/io/schedule/session/85311b0e-7... The answer to this request is "Java is the official Android development language".
Re: Google, it's time – We want Scala for Android
#77Earlier quoted context omitted.
Groovy has supported compile-time safety since version 2.0 with the optional @CompileStatic annotation. It's one of the few languages where you can mix static and dynamic typing, even within the same class. With this annotation enabled, you get pretty close to pure Java performance but with 1/5 the lines of code in some case. For something like Android, running Groovy with CompileStatic enabled by default would make…
> It's one of the few languages where you can mix static and dynamic typing In theory, but in practise virtually everyone uses the dynamic typing only. Groovy's really only used with Grails and for testing Java classes. > Android, running Groovy with CompileStatic enabled by default would make a lot of sense Unlike other statically-typed languages, Groovy's CompileStatic code was written by only one person and having…
Why ? is it a social thing? or a technical thing?
Re: Google, it's time – We want Scala for Android
#78Um, people have already been able to use Scala to make Android applications. Just about anything that doesn't require dynamically generated JVM bytecode can manage, difficult and error-prone as it is. If we're talking about official support, then I'd rather Java 8 instead. And beefing up ART even more.
Re: Google, it's time – We want Scala for Android
#79Earlier quoted context omitted.
It unifies the type system, which gets one of the big headaches of Java out of the way. It has a generics system that makes a lot more sense (allowing covariant/contravariant types, rather than forcing use-site variance everywhere). Case classes are wonderful for making simple data classes easy to read (and write). Honestly Scala is all about solving the pain points with Java, so just look at anything that's been wri…
right, all nice to have things. Does it actually solve any real problems? Does it fix GC performance? Does it fix API issues? Does it remove the need for JNI bindings to native code? No?
Implicits make it much easier to deal with API issues.
Re: Google, it's time – We want Scala for Android
#80Earlier quoted context omitted.
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.
There's no substantiative argument in this comment. > Scala, as a programming language, tries to incorporate too many concepts Too many concepts? Says who? How many concepts is too many? You don't have to use them all, and you can pick them up fairly easily as you go along; that's exactly how I learned the language. > while still trying to be typesafe. Not sure why that's contentious. > This makes the language comple…
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 punctuation-laden operators that aren't immediately interpretable by people not familiar with the language.
Whether legibility from non-experts is important is absolutely a matter of opinion and personal taste (it's a clear source of disagreement between the Python and Ruby communities as well), but if you're someone who thinks it's an important property for languages that get widespread adoption to have (and I am), looking at Scala code as it seems to typically be written would give you (or at least gives me) pause. I can look at Swift without having ever written any and know roughly what it's doing. I can't with Scala. I don't think they fill the same niche, as the poster seems to be advocating that they could.