DIP23 draft: Fixing properties redux

Dmitry Olshansky dmitry.olsh at gmail.com
Mon Feb 4 07:33:04 PST 2013


04-Feb-2013 19:15, Andrej Mitrovic пишет:
> On 2/4/13, kenji hara <k.hara.pg at gmail.com> wrote:
>> This is not correct."m.s & m.s" is always parsed as binary bitwise AND expression.
>> So there is no address expression.
>
> Fantastic, more special casing. I don't think you guys realize what a
> mess you would introduce. Basically:
>
> s & s;  // fine, they're binary operators
> &s;  // oops, doesn't work even if property returns a type with a unary operator

Unary & is not overloadable, precisely due to confusing mess it can 
create (see C++).


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list