Field and Method Literals
Neal Gafter
neal at gafter.com
Sun Apr 17 09:38:27 PDT 2011
On Sunday, April 17, 2011, Chris Beams <cbeams at vmware.com> wrote:
> Method (and field) literals seem to me an obvious addition to the language; I've often wondered why they weren't there from the beginning, just as class literals have been. Is there a theoretical reason why they should not or cannot be introduced? I would think they are more fundamental than any closure proposal, and that closure proposals would build atop field/method literal support as opposed to the other way around.
Chris-
The sort of method literals you're looking for - of type
java.lang.reflect.Method - have very little to do with anything
proposed for closures. The only thing they have in common is that the
same syntax has been proposed for both.
Cheers,
Neal
More information about the coin-dev
mailing list