Live data from Hacker News

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

blog.madhukaraphatak.com

141–148 of 148 posts

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

#141
post #24

It 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".

In all fairness they also explained that they don't communicate about what they will or might do. Although some core members of the Android team are indeed very outspoken on their opinion that a switch to another language would have a way too big cost/benefits ratio, it does not mean that it cannot happen at some point in the future.

In the meantime, the android tools team is hard at work improving the usage of Java on Android. Some examples that should be coming soon : -the end of the 65k limit. -enums with int performances/costs, at least for basic cases. -code hot-swaping (for 2015).

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

#142
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…

The advantages of immutability are real. At some point an improvement has to be a change. Even if Google sticks with Java-only, I would very much hope they will offer a more immutability-friendly API in parallel with the existing one.

Certain Scala libraries are indeed not accessible. But the trend is in the right direction (there are better alternatives to requests now, and even scalaz has become less symbolic in recent releases). If Google were to provide the same APIs and sample programs that they currently do, those programs would be as accessible as they currently are - probably more so, given Scala's cleaner syntax. You say this could make Android less accessible. Maybe. But it could also make Scala more accessible, providing a whole new class of developers with a stepping-stone from somewhere very familiar towards these valuable high-level features.

As the Python folks say, a good language should make easy things easy and hard things possible. IMO Scala does both halves better than Java. It's just that so far, people have mostly been using it for hard things.

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

#143
post #142
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…

The advantages of immutability are real. At some point an improvement has to be a change. Even if Google sticks with Java-only, I would very much hope they will offer a more immutability-friendly API in parallel with the existing one. Certain Scala libraries are indeed not accessible. But the trend is in the right direction (there are better alternatives to requests now, and even scalaz has become less symbolic in re…

Google should do something about their APIs, sure. But they should do something about their APIs before doing something about their language.

The problem with Scala is not symbols or legibility (although that used to be a major problem), but the fact that its programming style tends to be mostly functional. Monads, for-sugar, implicits, immutability: stuff everyone should master but in practice very few do.

> You say this could make Android less accessible. Maybe. But it could also make Scala more accessible, providing a whole new class of developers with a stepping-stone from somewhere very familiar towards these valuable high-level features.

The Android developers unfortunately have no interest in making Scala more accessible. They have an interest in making Android more accessible. They would have to make a lot of sacrifices to make Scala a primary language for Android, and the benefits would be rather small from their perspective.

Scala's killer apps are on the server side. That seems to be going quite well so far.

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

#144
post #143
post #142

Earlier quoted context omitted.

The advantages of immutability are real. At some point an improvement has to be a change. Even if Google sticks with Java-only, I would very much hope they will offer a more immutability-friendly API in parallel with the existing one. Certain Scala libraries are indeed not accessible. But the trend is in the right direction (there are better alternatives to requests now, and even scalaz has become less symbolic in re…

Google should do something about their APIs, sure. But they should do something about their APIs before doing something about their language. The problem with Scala is not symbols or legibility (although that used to be a major problem), but the fact that its programming style tends to be mostly functional. Monads, for-sugar, implicits, immutability: stuff everyone should master but in practice very few do. > You say…

> The Android developers unfortunately have no interest in making Scala more accessible. They have an interest in making Android more accessible. They would have to make a lot of sacrifices to make Scala a primary language for Android, and the benefits would be rather small from their perspective.

I think just fixing their god-damn bugs would be enough to make people happy.

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

#145
post #143
post #142

Earlier quoted context omitted.

The advantages of immutability are real. At some point an improvement has to be a change. Even if Google sticks with Java-only, I would very much hope they will offer a more immutability-friendly API in parallel with the existing one. Certain Scala libraries are indeed not accessible. But the trend is in the right direction (there are better alternatives to requests now, and even scalaz has become less symbolic in re…

Google should do something about their APIs, sure. But they should do something about their APIs before doing something about their language. The problem with Scala is not symbols or legibility (although that used to be a major problem), but the fact that its programming style tends to be mostly functional. Monads, for-sugar, implicits, immutability: stuff everyone should master but in practice very few do. > You say…

> The Android developers unfortunately have no interest in making Scala more accessible. They have an interest in making Android more accessible. They would have to make a lot of sacrifices to make Scala a primary language for Android, and the benefits would be rather small from their perspective.

Accessible is one thing, but not the only thing that matters, particularly as the platform matures. If using Scala makes developers more productive, or leads them to write less buggy code, that could be a huge advantage for Android.

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

#146
post #145
post #143

Earlier quoted context omitted.

Google should do something about their APIs, sure. But they should do something about their APIs before doing something about their language. The problem with Scala is not symbols or legibility (although that used to be a major problem), but the fact that its programming style tends to be mostly functional. Monads, for-sugar, implicits, immutability: stuff everyone should master but in practice very few do. > You say…

> The Android developers unfortunately have no interest in making Scala more accessible. They have an interest in making Android more accessible. They would have to make a lot of sacrifices to make Scala a primary language for Android, and the benefits would be rather small from their perspective. Accessible is one thing, but not the only thing that matters, particularly as the platform matures. If using Scala makes…

If Scala makes developers more productive and code less buggy at all, it will only do so for some developers. Look at the investments required: APIs need rewriting, apps need rewriting for the new APIs, people need to be trained within Google, people need to be trained for it outside of the workplace, and other people will still look at Scala code and stay behind confused.

And you need to do that for what? Because Java is too verbose? I hate (real-world) Java as much as the next guy but I don't have any illusions on this because the argument just doesn't add up and the effort doesn't seem worth it by a big margin. It would be much more feasible if Google would release an improved Android APIv2 with stronger immutability, first-class support for Java 8 and its features (lambdas, Optionals) and no 64k DEX limit. That would be a huge improvement for both Java and Scala Android devleopers, and it would also be feasible.

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

#147

Earlier quoted context omitted.

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.

By the way it seems that Dart is struggling to get any support at all within Google. Also, it's not statically typed and bringing it to the Android runtime might be much more effort. In short no, I wouldn't bet Go or Dart will be the solution, not unless these languages change a whole lot.

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

#148
post #115

Earlier quoted context omitted.

When I say proven out, I don't mean in the sense of being widely used; I mean academically. In other words, I am trying to say that it's not a research problem, it's a problem of, say, engineering and marketing to bring it to reality. Cool language features are well established in academia (but tend not to go anywhere due to entrenchment and industry complacency – in that sense I would agree that they aren't 'proven'…

If Google says "This is the second official lanuage for Android" I bet any adoption issues would go away a la Swift.

Google would need to do this internally. Good luck convincing the 10,000 developers inside of Google stop using Java. Sure, they aren't all on Android, and there are plenty of people using Go, or Dart, or Python, but moving a company culture that large away from Java doesn't happen overnight.

Obj-C to Swift won't happen overnight at Apple either, but it is much more likely to happen because they've been gradually working towards it for years now with LLVM and such.

Post reply on HN