On Sunday, 2 December 2012 at 01:04:03 UTC, Jonathan M Davis wrote:
On Sunday, December 02, 2012 01:16:40 Andrej Mitrovic wrote:
On 11/20/12, Jonathan M Davis <[email protected]> wrote:
> I suspect that the
> best that we can hope for at this point is for lax property > enforcement - > that is that it's enforced that @property functions are used > as properties > but there is no enforcement that non-@property functions be > called with
> parens.
Here's a good reason why the latter isn't the best idea:
http://d.puremagic.com/issues/show_bug.cgi?id=2159

The reporter made the mistake of issuing a function call instead of taking an address of a function, which in turn invoked a different
function overload with the temporary result.

I'd _love_ to make it illegal to call non-property functions without parens, and there are definitely folks around here who agree with me, including some on the Phobos dev team (e.g. Steven has always agreed with me when this has come up), but there are enough folks around here here who like to call functions without parens - especially with UFCS and templated functions like map or filter - that I don't think that that's going to fly at this point.

As said before a lot of such usages can be made valid with a sane semantic using opDispatch.

BTW, I can't edit in the wiki? When I try to do so, it says me that deadalnix is an invalid username. If I need to register, I didn't found out how.

Reply via email to