In looking through Tom Christiansen's Perl Style guide recently, under "Defensive Programming" was an item that said simply "Parameter asserts". No explanation was given as to what "parameter asserts" are and how they are to be used.
I'm making a wild guess that the phrase somehow means "functions should check parameters passed to them to verify that they are reasonable". Does that sound correct?
- How would I code "parameter asserts"? I checked the camel book, but there doesn't seem to be an "assert" keyword.
- Do you personally use them in your code? Why or why not?
(Plug: Visit JavaJunkies, PerlMonks for Java)