Keep accessors and mutators separate
From CSSEMediaWiki
Revision as of 03:14, 4 October 2008 by Elliot Fisher (Talk | contribs)
This is basically the Avoid side effects principle, but specifically applied to Getters and setters.
A getter should only ever return a value and not modify anything. A setter should only ever modify a value and not return anything.