Keep accessors and mutators separate
From CSSEMediaWiki
(Difference between revisions)
Elliot Fisher (Talk | contribs)
(New page: 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 sho...)
(New page: 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 sho...)
Latest revision as of 03:14, 4 October 2008
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.