m.invoke() vs. m()
Vladimir Kirichenko
vladimir.kirichenko at gmail.com
Sat Dec 5 12:38:05 PST 2009
Vladimir Kirichenko wrote:
> The question is: "does this make java better or worse". If it leads to
Even better question: does java closures looks better or worse comparing
to other languages. If it worse - the question is: what is the point
doing it worse.
Doesn't this code look weird?
m();
m1.invoke();
x.y();
x.z.invoke();
One of the points of adopting closures in java was simplification of
syntax for cases where anonymous classes now applyed: Threads, Filters,
Comparators. Why do we need it in the half-completed way - in the place
of declaration it looks better, in the case of using it looks the same?
The next request of enhancement would be to make it simpler.
--
Best Regards,
Vladimir Kirichenko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091205/36d0d080/attachment.bin
More information about the closures-dev
mailing list