14 Jul 2004 12:35
use special syntax for method pointers?
It seems a common confusion for people to do things like
x = foo.length
when really the method is called length() and today groovy returns a
method pointer. If we go to support optional parenthesis altogether,
then this is really gonna be a problem as we'll lose our ability to
lookup a method pointer.
So maybe we need a syntax for creating a method pointer?
method = someObject.&doSomething
// pass this around as a closure
method(1, 2, 3)
Thoughts?
James
-------
http://radio.weblogs.com/0112098/
RSS Feed