MethodHandle vs function types
Rémi Forax
forax at univ-mlv.fr
Mon Feb 22 08:14:37 PST 2010
Le 22/02/2010 16:26, Neal Gafter a écrit :
> On Mon, Feb 22, 2010 at 1:54 AM, John Rose<John.Rose at sun.com> wrote:
>
>
>> Based on comments from several people (including you–thanks!) the committee
>> has agreed to provide a method handle invocation called "invokeGeneric" that
>> provides on-the-fly reference conversions and boxing/unboxing conversions
>> (N.B. but not primitive conversions).
>>
>>
> Why the boxing/unboxing conversions? Those aren't part of the proposed
> function subtype relation or the function subtype relation in any existing
> language. Is this to help support language interop between Java and
> languages that have only the reference version of primitives?
>
Yes,
this also allows to replace java.lang.reflect.Method invocation by
MethodHandle + invokeGeneric
because it defines the same semantics.
Rémi
More information about the lambda-dev
mailing list