Structured Programming And Single Exit Point

One of the tenets of structured programming that isn’t followed in modern programming is that of the single point of exit.

Based on the structured programming book I read, single point of exit is required to allow for easy postconditions of program functions and to allow the use of “prime programs” for reasoning about a system. The first one isn’t that big of a deal, you can just “wrap” the program up to get points where you can write postconditions. The only problem is that you end up with a non-tiny collection of prime programs.

I’m going to have to read Knuth’s “Structure Programming With Goto” again to figure out how reasons about code with gotos. This is also important for reasoning about exceptions.

Comments are closed.