PythonPower
PythonPower

Reputation:

What will Support for Dynamic Languages in Java 7 be like?

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);

Upvotes: 6

Views: 1849

Answers (3)

Pascal Thivent
Pascal Thivent

Reputation: 570505

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.

Upvotes: 5

Brian Agnew
Brian Agnew

Reputation: 272337

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.

Upvotes: 0

ergosys
ergosys

Reputation: 49029

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

Upvotes: 2

Related Questions