java 8 release candidate should be out in a week with general availability scheduled for the end of march. this introduces lambda expressions. syntactically, they're similar to anonymous inner classes (AICs), which i use extensively as kilim tasks. many end users are uncomfortable with AICs (and the boilerplate is a pain), so i'm curious if kilim is going to be able to support lambdas. for comparison, here are AIC and lambda impls:
ctrl.place(
new Task() { public void execute() throws Pausable {
users.insert(tid, username, digest);
}});
ctrl.lambda(tid ->
users.insert(tid, username, digest));
ctrl.lambda() and ctrl.place() handle adding the task to a mailbox. ctrl.lambda warps the lambda in a Task. the functional interface for lambda is the same as Task.execute, ie Pausable. the bodies and functionality are identical, and the lambda is simpler / cleaner / prettier. i'm optimistic that end users will be more comfortable working with the lambdas than they have been with the AICs
i've tried using kilim with java 8 (ie without using any features of java 8) by replacing asm-all-4.1.jar with asm-all-5_beta.jar and it weaves without errors but the resulting bytecode won't run, ie java can't even find the main method. i haven't made any effort to debug what's happening
and have only glanced at the resulting bytecode
does kilim have any plans for java 8 or a sense of how much engineering effort is required to support lambdas ?