Saturday, August 11, 2012

Things I would like to have in the Java Programming Language

1) The class name is the class object

If Foo is a class than Foo should be the class object, not Foo.class

2) Method literals

If class Foo has a method bar than  

Foo.bar

should be an instance of the java.lang.ref.Method class, i shoudn't have to write

Foo.class.getMethod ("bar", null)
 
3) Method literals (part II)

If object foo of class Foo has a method bar, than foo.bar should result in an instance of a new class java.lang.ref.InstanceMethod which holds a reference to the bar object and to the Foo.bar method.

4) Method literals (part III)

If foo is an instance of the  java.lang.ref.Method, than foo () should result in method invocation, I should not have to use foo.invoke ().The same applies if foo is an instance of the new class java.lang.ref.InstanceMethod

5) Operator overloading on java.lang.Number instances.






No comments:

Post a Comment