by cpprototypes · 12y ago · 0 comments
http://tools.android.com/tech-docs/new-build-system/user-gui...
"However, the key thing about invokedynamic is that it's essentially a JVM-level macro that defers lambda translation strategy to LambdaMetaFactory which is a library class. If Java 9 or 10 gets more direct (and performant) support for lambdas that won't require classes and object allocations then it can swap implementation of LambdaMetaFactory and all _existing_ code written for Java 8 will get performance boost. That is the brilliance of using invokedynamic in context of translating lambdas. We'll have to wait for future versions of Java to experience those benefits, though."
Have you checked this talk at Java ONE?
http://parleys.com/play/5251c164e4b0a43ac1212459/about
Some older slides also available
http://www.slideshare.net/jaxlondon2012/lambda-a-peek-under-...
I assume other certified JVMs would follow similar design approaches.
The implementation can be optimised at any point.
Default support of ART or Java 8?
If Java 8, how do you know this? Citation needed ;)
Arguing whether Java 8 will be completely supported or not ignores the nature of the Android API. Android doesn't even support 100% of Java 6 because it is not a desktop JDK and does not intend to replicate everything.
However, the Android team has actively been adding default support of Java 7 features piece by piece in recent months. They intend to handle Java 8 in the same manner. It's not clear which features will be supported in what version of Android, but lambdas are clearly a priority and can already be used today by early adopters using retrolambda.
Google did indeed managed to pull a Microsoft and now we have a forked Java implementation getting steady behind the standard Java implementations.
Even J2ME is more compatible with its big brother than Android.
KitKat has now partial support for Java 7, with libraries still missing some pieces. Dalvik and ART still don't support invokedynamic bytecode.
And since almost no one has KitKat, one cannot use try-with-resources anyway.
Late edit: perhaps Oracle should make a phone ;)
Try Intellij IDEA / Android Studio. I find them quite reliable.
They did an open spec tablet with a raspberry pi tough.
Eclipse
/shudder
I read somewhere that some in the Android team are C converts doing their first Java gig.
Have you seen how broken are the generated Renderscript bindings? They don't have anything to do with Java conventions and feel completely out of place.
Are you serious?
J2ME is even more crippled than Android's Java (no reflection, no Swing, no AWT and stuck in Java 1.4).
J2ME has been dead for more than half a decade and we have Android to thank for that. Good riddance.
http://www.oracle.com/technetwork/java/embedded/overview/jav...
If you think that's wrong, fine but that lawsuit had nothing to do with bytecode.
Lots of embedded devices make use of J2ME, e.g. cars, manufacturing, electricity monitoring...
Having a different implementation doesn't change the limitations imposed by out of date VM running on a device.
I'm not aware of any plans to support Java 8 yet, but I haven't been looking.
Android does not have any of this (http://developer.android.com/reference/packages.html) because the Apache Harmony project died before it could implement Java 7 API changes.
This is a much bigger issue for Java 8. Just supporting only Java 8 syntax changes greatly reduces the benefits of the new lambda and default methods. Much of the power of the changes, especially lambda, require the changes to the collections API.
Harmony didn't die per se - It was killed by Oracle. Google's rationale for engineering a Java-ish VM with Java APIs was only legal up until Java 6.
I doubt it will ever happen.
Dalvik is dead. It has been already fully replaced on the latest AOSP code drops. Plus SL4A was left to rotten.
As for Go, lets see. My ticket is now two years old.
Yes it has. They recently added Java 7 language support.