Method references in annotations?
shrode at subnature.com
Tue Aug 9 09:04:25 PDT 2011
Thanks for the pointers. The landscape is clearer and
past email threads are clearer.
Once functions can be treated as some fashion of a literal,
some functional language behavior is immediate.
To me, the trouble is that those behaviors should be accidents
instead of goals to keep temptation away.
Has the following been considered previously?
SAM sammy = ...
Method sammyMethod = Method.convertToMethod(SAM.class, sammy);
It seems the above code pattern could be sugared thusly:
Method sammyRef = #Person.getLastName
Treating Method as a SAM, Method.invoke, in order to implement
a "method of" feature.
Has that been considered previously? What was the discussion?
The expectations around the use of lambda.this seem, at first blush,
following the usage of constructor-call this, treating "this" as an
obvious, but unnamed, function call.
I believe the above questions are trying to generalize the feature
Has this been noted previously?
I will leave my questions here for now,
More information about the lambda-dev