Live data from Hacker News

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

blog.madhukaraphatak.com

51–60 of 148 posts

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

#51
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.

I don't get it, nobody is forcing you to do all the type level hackery that you can conjure, why rant about it?

It gives tools to those who need it in a simple and elegant way, why is this a problem?

Use the features you find useful, don't use what you don't want to.

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

#52
post #40

Swift doesn't have a GC from what I know it has automatic reference counting. It's not really the same thing. It's on compile time and not at run time. It injects release/retain calls between acquiring ownership and relinquishing ownership. I could be wrong but I don't think they added GC to Swift, as Objective-C (at least not on Mac OS) doesn't have it. EDIT: They got rid of the GC on Mac OS as well. They use ARC th…

Correct, Swift uses reference counting in just the same way Objective-C did.

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

#55
post #38
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.

Groovy's founder has said that he wouldn't have bothered creating it if he'd known about Scala at the time. In Scala you can write almost the same code as Groovy, word for word - but you don't have to give up compile-time type safety for it. (Of course you can do more complex things in Scala, taking advantage of the powerful type system. But you don't have to if you don't want to)

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 a lot of sense.

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

#57
post #19

Please not scala! I prefer to have clojure for android. Scala is too complex, to ugly, and tries todo too much. Its also to heavy for android (it needs tons of libs to run).

It seems to be that what's really needed is better JVM language interoperability in Android, then you can choose your poison.

* As an aside, for beginner programmers I think that asking them to use a Lisp is far more conceptually challenging than using the basic syntax of Scala (could be wrong though... I don't know Clojure, but I found Common Lisp fairly easy to understand yet know that many beginners do not).

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

#58
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.

> Groovy could be one such language

Android needs a statically typed language, but Groovy's dynamically typed, and the statically typed portions available via annotations since version 2.0 isn't really used much. Groovy's still usable for its original use case of manipulating and testing Java objects, and with Grails, but the more recently promoted stuff isn't being used in favor of other options, and even Gradle seems to have been totally rewritten in Java for Gradle 2.0. I suspect Gradle will soon open its configuration as an API so any language can be used with it.

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

#59
If they're not even giving us Dart or Go for Android (their own languages), what is the probability they will give us official support for Scala? Yes, Scala runs on the JVM, and the former two don't. And yes, Go is not really designed as an end-user GUI application building language. But Dart has a nice VM of its own and is designed for client-side apps. I would like to see Dart on Android and the original author is definitely confused when he calls Dart and Go "niche" languages (as a way of dismissing them) and somehow doesn't feel the same way about Scala. Scala might be marginally more popular than Go/Dart but it's not an order of magnitude. In fact, according to the latest Tiobe index (a terrible metric in my opinion, but one indicator) Go is more popular than Scala by one place.
Post reply on HN