Problem with method references

Rémi Forax forax at
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:
>>     #methodName
>> 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 
mean not
constructor call from a constructor (this(...)) but constructor call 
that return a newly
created object.

Something like:  new#Integer(int)
which should be typed (int) -> Integer.

> Maurizio


More information about the lambda-dev mailing list