scolebourne at joda.org
Thu Jul 8 23:32:25 PDT 2010
Thanks for a good explanation. I believe you missed a key element when
you said java only has A. Inner classes. These may be a method in
terms of the language spec, but they are used as a closure (B). When i
write an anon inner class for a filter or comparator, i don't think of
it in class terms, and i suspect i'm not alone in that.
And it is still possible to use return for long-return C. This simply
requires a language feature separate from closures, where the block
must be executed before the end of the method, a la macros. So, the
trick is retaining enough syntax space for a macro-like block in the
future with long-return.
BTW, does anyone outside oracle actually like 'yield'?? All the mails
have opposed it so far IIRC
More information about the lambda-dev