On Tue, Jan 24, 2012 at 2:40 AM, John Rose <john.r.r...@oracle.com> wrote: > On Jan 23, 2012, at 11:26 PM, Charles Oliver Nutter wrote: >> FWIW, I'm using this in the tests for invokebinder, for testing the >> tryFinally operation: > > That binder stuff is great. Next, we want a builder syntax in Java (for more > than just List+Map constants). Plus a little type-system bridge from > Foo::bar and foo->bar to MethodHandle. Then we can compose our method > handles quite swimmingly.
A syntax in Java would be quite powerful. Hopefully something like invokebinder can bootstrap it. I've grown quite fond of it now, and I'm using it to replace some of the ugly bits of JRuby's indy logic. Here's the tests I have for it. Not all MethodHandles transforms are implemented, but most of them are there: https://github.com/headius/invokebinder/blob/master/src/test/java/com/headius/invoke/binder/BinderTest.java The unfortunate thing is that it would be a whole lot nicer if I had lambda right now. Here's that same tryFinally setup from before with a hypothetical version that uses lambda expressions. https://gist.github.com/1668691 Damn near as syntactic as you would ever really need. :) - Charlie _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev