D's "accessors" are like abusing operator overloads

Derek Parnell derek at psych.ward
Fri Mar 27 14:04:17 PDT 2009


On Fri, 27 Mar 2009 18:57:50 +0300, Denis Koroskin wrote:

> This way you can't do "a = b = c = 42;"-style chaining.

A bit off topic, but what's so good about that coding style anyway?

I still think that readibilty and maintability is enhanced by coding ...

  // Set all to same value
  a = 42;
  b = 42;
  c = 42;

or even ...

  // Set all to c's value
  c = 42;
  b = c;
  a = c;

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d mailing list