ABSTRACT

Every single procedure and function checks the sanity of its arguments and refuses to continue when the arguments are unreasonable, jumping out of the function. Certain programming languages are, by design, hostile to supporting the Passive Aggressive style, encouraging either the Constructivist or the Tantrum styles. C is a good example of such a language. But even when languages support exceptions, not all programs written in those languages are passive aggressive with respect to abnormalities, as demonstrated here. In many applications, though, the Constructivist style has several advantages over the other two. By assuming reasonable fallback values to erroneous function arguments and returning reasonable fallback values when things go wrong within a function, we allow the program to continue, and do its best at the task that it is supposed to do.