proposal to disambiguate &a.fun: disable optional parenthesis INSIDE &() expression

deadalnix deadalnix at gmail.com
Mon Feb 4 02:11:22 PST 2013


On Monday, 4 February 2013 at 10:09:09 UTC, timotheecour wrote:
> There's current disagreement regarding the syntax &a.fun, as it 
> makes &a.fun be different from &(a.fun):
> &a.fun   : address of member function
> &(a.fun) : address of return value of a.fun
>
> This breaks the usual rules of scoping and makes the expression 
> &a.fun special. More complex cases can arise, eg: &a.b.c, 
> &(a+b).c, etc as pointed out by others, plus who knows what 
> else might come up in practice.
>
> Here's a very simple proposal:
>

MOAR special cases !


More information about the Digitalmars-d mailing list