.NET 4.0 introduces new support for dispatching invocations on dynamically typed objects. As far as I can make out, this involves:
- no change to the CLR
- new types in the BCL
- new compilers that convert new syntax into usages of the new types
In the Java space, folks are discussing adding a new dynamicinvoke
bytecode to the JVM such that the dispatch is handled by the JIT, behind the abstraction of the intermediate language.
The Java approach has support from many significant parties.
These seem like two fundamentally different approaches. What are the merits of each, and why did both camps choose to take different paths? I'm especially interested in the flexibility and runtime performance of both solutions. Are both VMs ultimately trying to achieve the same thing?