Also, exceptions (unlike gotos) cannot be used to jump backward, thereby creating hidden loops.
Used correctly, exceptions eliminate large amounts of code that would otherwise be required to handle unexpected failures at every level in a function call stack and propagate such failures upwards by way of return codes etc. to a point at which some remedial action can be taken. Exceptions can certainly be misused, but they are much better than the alternatives in many situations. David Crocker, Escher Technologies Ltd. Consultancy, contracting and tools for dependable software development www.eschertech.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of der Mouse Sent: 31 August 2006 22:45 To: SC-L@securecoding.org Subject: Re: [SC-L] How can we stop the spreading insecure codingexamplesattraining classes, etc.? >> ever heard of exceptions? They're basically goto plus limited state. >> Spaghetti lives! Not at all. Exceptions are not like gotos; in particular, an exception cannot be used to jump *into* a construct. The major problems with gotos are that they can be used to do branches that are downward or sideways in the code parse tree (versus "structured" constructs, which do such branches upward only). Exceptions are upward-only branches, and as a result don't have most of the problems gotos do. /~\ The ASCII der Mouse \ / Ribbon Campaign X Against HTML [EMAIL PROTECTED] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B _______________________________________________ Secure Coding mailing list (SC-L) SC-L@securecoding.org List information, subscriptions, etc - http://krvw.com/mailman/listinfo/sc-l List charter available at - http://www.securecoding.org/list/charter.php _______________________________________________ Secure Coding mailing list (SC-L) SC-L@securecoding.org List information, subscriptions, etc - http://krvw.com/mailman/listinfo/sc-l List charter available at - http://www.securecoding.org/list/charter.php