DIP23 Counter Proposal

Steven Schveighoffer schveiguy at yahoo.com
Thu Feb 7 05:56:18 PST 2013


On Wed, 06 Feb 2013 21:53:25 -0500, deadalnix <deadalnix at gmail.com> wrote:

> On Wednesday, 6 February 2013 at 21:30:10 UTC, Timon Gehr wrote:
>>> &(fun, fun)
>>>
>>
>> Agh, comma strikes again. It should be handled analogous to the ternary  
>> expression. i.e. the expression above evaluates fun and then returns  
>> the function pointer. The DIP now states this. (the second fun is in  
>> address-taken position.) This is in agreement to how lvalue positions  
>> propagate into comma expressions.
>>
>
> Adding more special cases are not gonna create a good DIP.

I don't they are so much a special case, as they are a clarification.

The two "exceptions" are simply explaining that because ternary operator  
and comma operators evaluate to an lvalue, it is equivalent to putting the  
& on the resulting lvalue.

-Steve


More information about the Digitalmars-d mailing list