You are previewing Code Complete, Second Edition.

Code Complete, Second Edition

Cover of Code Complete, Second Edition by Steve McConnell Published by Microsoft Press
O'Reilly logo

Additional Resources

cc2e.com/1792

The following resources also address unusual control structures:

Returns

Fowler, Martin. Refactoring: Improving the Design of Existing Code. Reading, MA: Addison-Wesley, 1999. In the description of the refactoring called "Replace Nested Conditional with Guard Clauses," Fowler suggests using multiple return statements from a routine to reduce nesting in a set of if statements. Fowler argues that multiple returns are an appropriate means of achieving greater clarity, and that no harm arises from having multiple returns from a routine.

gotos

cc2e.com/1799

These articles contain the whole goto debate. It erupts from time to time in most work-places, textbooks, and magazines, but you won't hear anything that wasn't fully ...

The best content for your career. Discover unlimited learning on demand for around $1/day.