"Robert Fraser" <fraseroftheni...@gmail.com> wrote in message news:guqpkf$2h4...@digitalmars.com... > > I mainly use it for initialization of things: > > static S opCall(_x, _y) > { > S s; > with(s) > { > x = _x; > y = _y; > happiness = null; > } > return s; > }
For things like that I have a series of util mixins, for example: class Foo { int x; int y; char[] name; this(int x, int y, char[] name) { mixin(initMember!(x, y, name)); } } And even if I didn't, I've never considered the repeated "this." or "s.", etc, to be non-trivial enough to really be worth an extra language construct - and I'm normally a complete DRY-maniac.