A possible solution for the opIndexXxxAssign morass

Chad J chadjoan at __spam.is.bad__gmail.com
Tue Oct 13 10:39:23 PDT 2009


Forgotten already?

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.



More information about the Digitalmars-d mailing list