Lambda and JSR 292 method handle

Howard Lovatt howard.lovatt at iee.org
Fri Dec 18 06:47:51 PST 2009


It is my reading of John's paper that an invokeGeneric on a
MethodHandle will do all the subtyping and that JavaMethodHandle uses
invokeGeneric under the covers, therefore yes to your point. I will
re-iterate that is my reading of his paper, I don't have any inside
knowledge.

 -- Howard.

2009/12/18 Neal Gafter <neal at gafter.com>:
> On Fri, Dec 18, 2009 at 2:55 AM, Howard Lovatt <howard.lovatt at iee.org>
> wrote:
>>
>> I thought the idea from the JSR 292 group was to use JavaMethodHandle
>> [1] (which extends MethodHandle). The difference is that the
>> JavaMethodHandle retains the type information, needed by Java, and it
>> can implement interfaces so you can use a lambda with an existing
>> function.
>
> Do the types representing jsr292's JavaMethodHandle obey subtype
> relationships that make them covariant on return type and contravariant on
> argument types?  Or, at least, is it possible to use the consistently so
> they act that way?
>
> Cheers,
> Neal
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>



-- 
  -- Howard.


More information about the lambda-dev mailing list