m.invoke() vs. m()

Vladimir Kirichenko vladimir.kirichenko at gmail.com
Sat Dec 5 12:12:23 PST 2009

Reinier Zwitserloot wrote:

> No it isn't. It's a closure invocation.

Closure is a function.

> Java isn't any of those languages. Fortunately the folks who make the
> eventual decision on this (Mark Reinhold and crew) strongly dislike this
> kind of "Hey, look at language Y, we can just copy what they do"
> thinking. 

Considering existing solutions is a basic of engineering. And the
question is not simple "hey look what my neighbor does". It "look what
theory and practice in this area exist".

> Your list of examples is an excellent case in point: All those
> languages DO NOT have multiple namespaces for the constructs that you
> posted. For example, in C#, friends that program in that language tell
> me you can't have a method named 'Foo' and a field also named 'Foo',
> which is collaborated by your example. So, for those languages, _duh_.
> Java isn't C#.

The question is: "does this make java better or worse". If it leads to
the "invoke"-like solutions - I have no idea what good have java got
from this. And even then there could be third namespace - for function
types or we could not consider function types pure variable-space
declaration. Let's dont stuck to something just because we call it some
way. Especially if it gives us nothing good.

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/cbeb531a/attachment.bin 

More information about the closures-dev mailing list