Live data from Hacker News

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

blog.madhukaraphatak.com

41–50 of 148 posts

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

#41
post #33
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).

Clojure would be too large a leap syntax-wise I think. Scala at the very least gives you both FP and OOP in the same language.

Perhaps, but some people have built pretty amazing abstractions in Clojure. I just found this tutorial, and was quite impressed:

https://github.com/krisc/events/blob/master/tutorial.md

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

#42
post #20

Um, 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.

Technically speaking, Android doesn't fully support Java 6. It's only a partial implementation of Java, since Java is overweight. The Android team has been adding requested features to the SDK in piecemeal form.

With that said, you can already get Java 8 lambdas in Android using the retrolambda project.

http://zserge.com/blog/android-lambda.html

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

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

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

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

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 complex, and not an ideal candidate.

Says who? Why? Should all complex things be abandoned? I find the Android framework itself complex, personally, so should we throw that out?

This is the same Scala FUD that's always prevalent on Hacker News. "The language does too much." So what? You don't need to know all the concepts to be proficient. The language's beauty is that you can write simple code and pick up the concepts as you go along. Library modularity generally means that you don't need to get into the deep end of the language unless you want to. Scala is an expressive language. That's an intentional design decision that makes it flexible. It is not a drawback. It does not make it overcomplicated for a beginner.

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

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

> It still doesnt change the fact that Scala, as a programming language, tries to incorporate too many concepts while still trying to be typesafe.

That's not a fact -- its not even a fact claim -- its a value judgement. "Too many", except as sloppy terminology for exceeding an objective criteria, is inherently a value-judgement qualifier.

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

#48
post #33

Earlier quoted context omitted.

Clojure would be too large a leap syntax-wise I think. Scala at the very least gives you both FP and OOP in the same language.

Perhaps, but some people have built pretty amazing abstractions in Clojure. I just found this tutorial, and was quite impressed: https://github.com/krisc/events/blob/master/tutorial.md

Similar abstractions implemented in Scala http://macroid.github.io/tutorial/BuildingLayouts.html

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

#49
post #15

according to apple, swift uses ARC, not GC. https://developer.apple.com/library/prerelease/mac/documenta... How does Scala solve any of the problems with Java?

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 written about it. http://www.scala-lang.org/

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

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

It would be a mass experiment on Functional Programming acceptance ;)

Considering that Visual Basic has monads, and lots of C# developers are regularly using closures, I think the response to "is FP accepted" is a resounding yes. Although .NET had to sort of smuggle those features in, under cover.
Post reply on HN