Re:Brand new Scala-lang.org
by wheaties on Tuesday July 30, 2013 @12:35PM
(#6128119)
Yes, Android's Garbage Collector is a one legged mule. Slow, crippled and needy. Scala, on the other hand, generates a ton of little objects. I'm a full time Scala dev but if I were doing Android I'd probably for the foreseeable future work in... dare I say it? Java.
[ Parent
| on HN ]
Scala creates a ton of little objects? Are you aware that primitive types are only converted to objects in Scala, if they are used as objects?
Re:Brand new Scala-lang.org
by kasey_junk on Tuesday July 30, 2013 @04:22PM
(#6129764)
Sure but every anonymous function call creates new objects, as do each call to the collections library methods (often many objects), for comprehensions, tuple creation, lazy vals, pattern matching, futures, options etc. all create objects.
If you are programming in a functional paradigm you will be throwing off garbage, often when you wouldn't expect to from a cursory glance at the code.
You can mitigate it, but often to do so you have to resort to writing scala as java (which is still better than java as java).