Re:C'mon, stop writing Java for Android
by technomancy on Wednesday May 25, 2011 @06:42PM
(#2585858)
Thanks; it's very helpful to see some hard numbers. That's quite good--I expected it to be much higher. I don't suppose it introduces any noticeable startup delay, does it?
No. Although Scala does introduce many more temporary objects so you might want to be careful with allocations and the types e.g. undiscriminated use of tuples. This may not be an issue depending on your performance needs.
Re:C'mon, stop writing Java for Android
by jamesbritt on Wednesday May 25, 2011 @08:20PM
(#2586128)
Thanks; it's very helpful to see some hard numbers.
Indeed. This is nowhere as bad as I had expected. Still don't like the language, but good to see that the "needs a carry-on bag to travel" argument is a non-issue.
As someone who is using scala for 2 android apps one small and another smaller, Proguard does more than maybe help, it shrinks it to a small size. From the Scala for Android page:
AndroidForScala includes a treeshaker (proguard) that removes all the parts of the android-scala library that you don't use. For a simple "hello world" the scala library takes up about 10kb, and for a larger real world app (500kb), the library takes up more like 25kb.