tags:

views:

171

answers:

3

It seems JSR 292 will add support for dynamic languages to the JVM but I've not seen many details about it. Will dynamic types be incorporated into the language (or just the VM)? If so, what will the semantics look like?

Will there be something like C# 4's:

dynamic x = 10, y = 5;
Console.WriteLine(x + y);
+2  A: 

You probably mean JSR 292, see this: http://blog.headius.com/2008/09/first-taste-of-invokedynamic.html

ergosys
A: 

JSR 292 is what you mean. There's a decent article on the changes here. The change is to provide a new bytecode instruction invokedynamic to permit dynamic invocation. See the Da Vinci machine project for more info.

Brian Agnew
+4  A: 

The New JDK 7 Feature: Support for Dynamically Typed Languages in the Java Virtual Machine article is a very good one and answers most of your questions. Pay a special attention to the section JSR 292 — The Next Step in Dynamic Language Support (yes, it's JSR 292, not 291).

JSR 292 introduces a new Java bytecode instruction for the JVM, invokedynamic, and a new method linkage mechanism.

Pascal Thivent