A possible solution for the opIndexXxxAssign morass

Bill Baxter wbaxter at gmail.com
Tue Oct 13 11:02:14 PDT 2009


On Tue, Oct 13, 2009 at 10:39 AM, Chad J
<chadjoan at __spam.is.bad__gmail.com> wrote:
> Forgotten already?

Apparently, yes!

> http://prowiki.org/wiki4d/wiki.cgi?DocComments/Property#Semantic
>
> This is the same problem as property lvalue-ness and it has the same
> solution.  When property rewriting is done correctly, the opIndexAssign
> problem can then be solved almost for free.
>
> Just treat opIndex expressions as properties, and when they are the
> subject of a side-effect then make sure the write property (AKA
> opIndexAssign) gets called.

Good call.

--bb



More information about the Digitalmars-d mailing list