|Don't ask to ask, just ask|
Re^3: C/C++ type assert() in Perl?by jdavidboyd (Friar)
|on Jun 10, 2004 at 23:59 UTC||Need Help??|
I learned that asserts are supposed to be used to
guarantee that the programmer did not make a mistake in
his coding, and pass in bad values to a subroutine.
In the case of the credit card, it would be pointless to assert() that the card is active.
It would be prudent, however, to assert() that the program passed in a valid card to
the subroutine that checks for active cards. Whether or not the card is active is not
a programming error. Not passing a valid card in certainly is.