http://tools.android.com/tech-docs/new-build-system/user-gui...
I assume other certified JVMs would follow similar design approaches.
"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."
So unless I'm missing something, please be specific.
http://cr.openjdk.java.net/~briangoetz/lambda/lambda-transla...
1. A method in its parent class. 2. An invokedynamic instruction at the call site.
The invokedynamic instruction calls LambdaMetafactory, which compiles an anonymous class at runtime that calls method #1. So the only benefit of using invokedynamic is fewer class files, by deferring generating them until runtime.
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-...
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.
Lots of embedded devices make use of J2ME, e.g. cars, manufacturing, electricity monitoring...
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 ;)
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.
From my experience once you get past the initial hump of learning their basic APIs and conventions its a very easy to work with platform. Maybe I am biased because I spend a lot of time with it. I also really like the tooling. How is it acting unstable for you?
They did an open spec tablet with a raspberry pi tough.
Try Intellij IDEA / Android Studio. I find them quite reliable.
Android Studio seems to still have performance issues with Gradle on Windows, specially when indexing stuff.
Eclipse
/shudder
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...
Also missing:
Reflection
Serialization
Lambda expressions (JSR 335)
JNI and application native code
User-defined class loaders
Full annotations support (Runtime annotations)
Thread groups and demon threads
Full Math APIs (with BigDecimals)
Concurrency utilities
Full security APIs
Full collection APIs (Sorted collection classes)
Source: http://docs.oracle.com/javame/config/cldc/opt-pkgs/api/cldc/...If you think that's wrong, fine but that lawsuit had nothing to do with bytecode.
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.