hg: lambda/lambda/langtools: Added basic support for constructor references.

Rémi Forax forax at univ-mlv.fr
Tue Jan 18 05:23:50 PST 2011


On 01/18/2011 09:16 AM, Thomas Münz, XDEV Software Corp. wrote:

[...]

> Personally, I think for consistency with JavaDoc, the "#" should be used for java.lang.reflect.Field and java.lang.reflect.Method (btw. can't it be used in parallel, distinguished by the compiler depending on context?), but in the end, I don't care much if it will be "#" or ":" or ">" or whatever. I only know that those missing literals are a "hole" in the language, are badly needed to accomplish flexible generic frameworks and should even today be kept in mind as a much-more-needed-than-expected feature for a future language extension.
>

There is a fundamental reason why a method reference can't be a 
j.l.r.Method:
There is a semantic mismatch: there is no corresponding j.l.r.Method to 
"hello"#length().
j.l.r.Method represents a class file method. So no way to represent a 
partially bound function.

Rémi






More information about the lambda-dev mailing list