Recently, i was reading about Java 7 features and invokedynamic was one of the most anticipated one. Most of the blogs/articles provide the advantages from JVM implementation point of view, specially for dynamically typed languages. From an application developer point of view, how does it affect me?
2 Answers
If you're writing an application in one of these dynamic languages, your app will (probably) run faster. Especially JRuby makes heavy use of it at the moment.
If you're writing in Java, it won't affect you, because Java (currently) doesn't use this instruction. I think there was some talk that one of the Java 8 language features might be using it, but I can't find a reference to that right now, and Java 8 is a long way away right now anyway.

- 15,133
- 7
- 57
- 84
In Java you can use MethodHandle as a faster alternative to reflection. You can read a bit more about MethodHandles here.
Note that MethodHandle does not use invokedynamic, but MethodHandle feature was developed to provide support for invokedynamic. For a Java application developer MethodHandle is the only benefit that arises out of the work towards invokedynamic.

- 7,903
- 2
- 34
- 49
-
This reply is now completely obselete & should be deleted. – kittylyst Mar 11 '15 at 16:05
-
can you please elaborate ? – Deepak Azad Mar 12 '15 at 16:15
-
Java 8 uses invokedynamic under the hood for quite a lot of its functionality - including lambdas & default methods – kittylyst Mar 14 '15 at 15:19