Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe because even with Android N, one cannot use all the official Java 8 API?

And then since Android N is only 7% of the market, it means giving up on the stream libraries and the remaining features that are Android 7 only?

Finally, because lambdas are implemented with inner classes instead of new JVM bytecodes like on the real thing, Java 8 code on Android will have a performance impact?

And yes, there is also a lack of Android knowledge on HN, as many don't even know the restrictions the NDK has.



You know you can use Android N (and later) and still target Android 19 and still use lambdas, right? Or did you mean something else? Maybe the developer page confused you. Can you clarify this for me?

And yes, I know you can't use all features of java 8, but this isn't what the posts are on about. They just ignore all facts and go straight to "android is stuck at java 6" and nobody really challenges them on this belief. I guess neither will you.


I do have Android development experience, but I have more Java experience all the way back to the early JDK releases, including having read enough papers about several JVM implementations.

The issue regarding lambdas has to do how they are implemented, by making use of inner classes instead of doing what Oracle has done in Hotspot and is being followed by most third party JVM implementations, meaning making use of invokedynamic infrastructure, thus being as if there was special bytecodes for lambdas.

This allows for more performance and optimization opportunities, which are much harder to achieve with plain inner classes.

Also those of us that like Java, always mean both the language and platform when talking about Java. The current situation is that now we need to write Android specific libraries instead of being able to pick any random Java 7 or 8 library and use it on Android applications, without any change.


Just so we are on the same page, I'm on about the feature superstructure, not the "implementation details for those of us that like java and always mean hotspot-like technologies when having a conversation about android language features".


Yeah, but those implementation details are leaky abstractions about the Java 8 feature superstructure performance on Android, and what Java 8 libraries are usable straight out of Maven repositories.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: