On 03/21/2011 11:24 PM, Charles Oliver Nutter wrote: > Yeah, binding backward makes sense for the standard API because the > only real "anchor" in the process is the eventual target handle. You > have to eventually end up *somewhere*, so that somewhere is what you > start with. I'm mostly making this API because of my own frailties...I > have endless problems picturing MH adaptation going backward, > especially since so many of the adaptations are explicitly going > *forward* like permute taking an expected input and permuting onto the > given handle). > > I did get reorder in, and it's far easier for me to follow when > explicitly going forward: > > MethodHandle handle = Binder > .from(String.class, Integer.class, Float.class, String.class) > .drop(0, 2) > .reorder(0, 0) > .invoke(target); > > ...with the end target having a signature of (String, String)String. > My brain is happy. > > - Charlie
Am I the only one to have the brain wired backward ? To understand your first example, I had to read your binder from the bottom to the top. I hope that's because I'm used to use the mh API. Rémi _______________________________________________ mlvm-dev mailing list [email protected] http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
