On 07/26/2012 11:50 AM, Aleksey Shipilev wrote: > Hi John, > > On 07/24/2012 11:02 PM, John Rose wrote: >> On Jul 24, 2012, at 11:09 AM, Attila Szegedi wrote: >> MethodHandle.bind is a less-general primitive. The general API is >> insertArguments. >> >> Good 292 support for primitives requires a signature-polymorphic API. >> >> Therefore, we have been considering adding something like this, to fill >> functionality not covered by bind and insertArguments: > Thanks for thinking forward on this. But let's get back to the original > issue: inconsistent API between MH.bindTo() and MHs.insertArguments(). > If the latter boxes primitive values, why not to allow the former to do > the same? Albeit it is not "a good support for primitives", but this is > the consistency improvement.
The idea that that bindTo() should be used as Attila said when you want to de-virtualize a method by fixing the receiver to a particular object. The idea is that when you see bindTo() in a code you know the intent of the programmer without having to track precisely which parameter is bound with which value. > > Thanks, > Aleksey. cheers, Rémi _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev