
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I would not like such a rule in a style guide, for fear of religious followers. My view is: yes, tighten the contract, but no, it needs not (but may) specify exactly t. If something useful can be returned, why throw it away? Best wishes Svante Am 15.01.2011 04:49, schrieb Bob Kerns:
Return 't'. Try to get the contract tightened up to specify t.
But so long as the contract is loose, in testing it can be useful to try to inject defects by returning other values.
For any one instance of this, the odds of there being a bug based on the return value is low. But given how many functions return boolean values, the odds of none of the calls to them having a bug aren't so good. Making everything return 't' as a matter of standard practice has the potential to eliminate quite a number of bugs (in the sense of bad behavior, rather than in the sense of incorrect coding).
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0xrfQACgkQFZBb0npmKsyFlwCfSTivBePPaXcj3K9SRH/6hXvM VaIAn2g+EXrUdMHH7DDULZCCmQ8X4Gb0 =DCgM -----END PGP SIGNATURE-----