On Tuesday, 29 January 2013 at 12:24:18 UTC, jerro wrote:
A bug like this will be found as soon as someone writes a test for that property or writes some code that uses it. And once it is found, it is trivial to fix. If the code was not tested at all, it is bound to contain other bugs anyway and some of those will be much harder to find and to fix.
except that someone would write the getter, then write the tests for the getter.
several years latter, another programmer writes the setter, and then the tests for the setter.
both the tests for the setter and for the getter work (and, through some hasard, even read/write tests would work, if anybody care to write).
then you put that class into production code and the plane crashes.
