Problem with method references
forax at univ-mlv.fr
Fri Jan 14 01:41:30 PST 2011
>> Hello Maurizio,
>> I see that referencing instance methods from static context is a desirable feature, but syntax-wise I aggree with Neal that the same expression should not change its meaning if moved from static to instance context or vice-versa (when both contexts are legal). So I propose that the syntax:
>> be made illegal for referencing instance methods from static context.
> I agree - since #methodName is essentially a shortcut for
> this#methodName, it is sensible to reject it in a static context.
> Thanks for the example - I will make sure to add it to our regression
> tests as soon as I add support for #this.
It remember something, do we have a plan to support constructor call, I
constructor call from a constructor (this(...)) but constructor call
that return a newly
Something like: new#Integer(int)
which should be typed (int) -> Integer.
More information about the lambda-dev