getAttr method

Janice Caron caron800 at googlemail.com
Fri Feb 1 23:39:05 PST 2008


On 2/2/08, downs <default_357-line at yahoo.de> wrote:
> > So, if you can recommend a better operator than opAssign, one with better semantics, I'm all ears. :)

The only thing that comes to mind is member assignment. e.g.

    stackthread.dg = { ... };

instead of

    stackthread = { ... };

You still get the braces at the end, and it's clear you're assigning a
property of stackthread, rather than overwriting its entire value. (It
is more typing though).



More information about the Digitalmars-d mailing list