Don't use goto

The C++ goto statement is a serious impediment to the maintainability and readability of code. When the visible appearance of code and the control flow correspond, it greatly aids comprehension and correctness. Using goto subverts this. With goto, you must read every line or you don't know what is going on.

Returning from the middle of a procedure is similarly suspect. Don't use either of these constructs. If you feel a burning need to do this, consult your architect.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker