Latest Thinking
John Rose
john.r.rose at oracle.com
Tue Jun 22 17:17:44 PDT 2010
On Jun 22, 2010, at 4:24 PM, Howard Lovatt wrote:
> I don't think there is confusion between a type name and a value,
> therefore proposed syntax OK (but maybe not the preferred). If you
> want a class you have to append '.class'.
Sorry, that would be a breaking change to the language, not an extension. The rules for identifier resolution are exquisitely balanced, and cannot be compatibly extended in this way.
// $ javac Foo.java && java Foo
// String! and String2!
class Foo {
public static void main(String... args) {
String String = "String!";
String String2 = "String2!";
System.out.println(String + (String)" and "+ String2);
}
}
-- John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20100622/86ed3471/attachment.html
More information about the mlvm-dev
mailing list