Lambda's/Closures & Extension Methods in JDK 1.6

Brian Goetz brian.goetz at oracle.com
Wed Sep 29 08:53:40 PDT 2010


> As I mentioned, I'm currently using them without even changing the compiler.
> They work well, but I find the syntax a bit cumbersome. I haven't found any
> brittle class issues. I should mention that the syntax was cumbersome enough
> that I didn't use them for about a year, until I started using lambdas. Now
> they have become more essential.
>
> Did you try out the solution?

A compiler-only solution fails on the following case:

interface Foo {
   public extension void foo() default X.a();
}

interface Bar extends Foo {
}

class C implements Bar { }

// Compile the above classes, then recompile Bar with:

interface Bar extends Foo {
   public extension void foo() default X.b();
}

// Re-run your program.  Now behavior of C is wrong; you call the wrong 
default when C.foo() is called.




More information about the coin-dev mailing list