Do we want functions to act as properties, or merely omit parens for ufcs/chaining?
FG
home at fgda.pl
Tue Jan 29 06:50:40 PST 2013
On 2013-01-29 15:00, eles wrote:
> well, make those parens omittableonly if the function name is
> followed by a dot.
This is a sound idea for typical cases:
typeof(foo); // works,
x = a.chain.of.operations(); // looks good and () are informative.
Only the problem with functions returning callable objects remains:
write(foo()()); // ugly but explicit and we know what happens,
foo().write(); // is it the phobos write or a write method
// of the object returned by foo?
More information about the Digitalmars-d
mailing list