DIP23 draft: Fixing properties redux

David Nadlinger see at klickverbot.at
Sun Feb 3 19:15:47 PST 2013


On Monday, 4 February 2013 at 03:11:25 UTC, Andrei Alexandrescu 
wrote:
>> There is no way such strange behavior could be explained in a 
>> way that
>> is coherent with the rest of the language.
>
> I disagree.

Then I'm eager to hear your explanation. Parentheses in an 
expression usually change precedence. Here they do something 
entirely different.

>> Introducing a rule by which parenthesizing an expression in a 
>> way that
>> does not change precedence suddenly causes a difference in 
>> behavior
>> certainly wouldn't be among the first ideas coming to my mind 
>> this way.
>
> I really think you are wrong about this. Parenthesizing has 
> nothing to do with this. &a.b is punctuation that creates an 
> indivizible unit.

a.b already is an indivisible unit, the result of the function 
call.

David


More information about the Digitalmars-d mailing list