Property rewriting; I feel it's important. Is there still time?
Pelle Månsson
pelle.mansson at gmail.com
Wed Mar 10 14:16:11 PST 2010
On 03/10/2010 10:14 PM, Steven Schveighoffer wrote:
> I think this is fine as long as we don't take it to the extreme. That
> is, I don't want to see this happening:
>
> foo.prop1.prop2++;
>
> is rewritten to
>
> auto p1 = foo.prop1;
> auto p2 = p1.prop2;
> p2++;
> p1.prop2 = p2;
> foo.prop1 = p1;
>
> I think one level of lowering is enough to handle the most common cases.
>
> Of course, if a property returns an lvalue, then it should just work.
>
> -Steve
Why would you not want that? That's exactly what should happen! Why not?
I'm sorry if I'm missing something obvious.
More information about the Digitalmars-d
mailing list