John Foust said...
|
|I use "goto" in C on a regular and consistent basis for error exceptions:
...
|The benefit is that all functions propogate an error code, any
|function can fail, and all functions clean up after themselves
|after their "out" label.
Bless you! [1]
Extremism is usually wrong.
Whether it's ``Goto is evil!'' or ``Every language needs a Goto!''
Hopefully everyone has read the brilliant esay by Dijkstra,
``Go To Statement Considered harmful.''
Equally important, however, IMO, are the pair of papers
presented at the 25ty ACM National Conference in October
1972:
A Case Against the GOTO (W. A. Wulf)
A Case for the GOTO (Martin Hopkins)
All of these are covered in Yourdon's _Classincs in Software Engineering_.
This, and _Writings of the Revolution_ (also Yourdon), both by Yourdon
Press, should be in every software developer's or hacker's library. (Yes,
hackers will get something out of these papers as well!)
Being out of print, they are probably worth a fortune on eBay, but I'm
hold on to mine. 8^)
-Miles
[1] Yes, I realize nobody sneezed.