Abstract
Although GOTO has long been criticized for being “unstructured” and causing “unreliable” programs, it is still provided even by new languages, and actually used in practice. Why?
This paper presents the results of a study in which we analyzed the frequency and typical applications of GOTO in over 400 MB of C and Ada source code. The frequency analysis showed a large difference in GOTO density. The usage analysis demonstrated that the availability of sufficiently powerful control structures significantly reduces the frequency of GOTO. Relating these results to error rates reported for large software projects indicates that programs written in languages with lower GOTO density are more reliable.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
J. Barnes. Programming in Ada 95. Addison Wesley, 1995.
B.A. Benander, N. Gorla, and A.C. Benander. An empirical study of the use of the goto statement. Journal of Systems and Software, 11 (3): 217 - 223, March 1990.
L. Bougé. The Data Parallel Programming Model: A Semantic Perspective. In The Data Parallel Programming Model, LNCS, pages 4-26. Springer, 1996.
F.J. Bourgeois. Communications of the ACM, 30 (8): 660, August 1987.
M. M. Brandis. Building an Optimizing Compiler for Oberon: Implications on Programming Language Design. In P. Schulthess, editor, Advances in Modular Languages, pages 123 - 135, 1994.
P.A. Buhr. A Case for Teaching Multi-exit Loops to Beginning Programmers. ACM SIGPLAN Notices, 20 (11): 14 - 22, November 1985.
E.W. Dijkstra. Goto Statement Considered Harmful. Communications of the ACM, 11 (3): 147 - 148, March 1968.
R. Fairley. Software Engineering Concepts. McGraw-Hill, 1985.
A.E. Fischer and F.S. Grodzinsky. The Anatomy of Programming Languages. Prentice-Hall, 1993.
D. Flanagan. Java in a Nutshell. O Reilley Si Associates, 1996.
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. Using and Porting GNU CC, 1995. (for GCC Version 2. 7. 2 ).
W. Gellerich, K. Brouwer, and E. Ploedereder. Myths and facts about the efficient implementation of finite automata and lexical analysis. In K. Koskimies, editor, Proceedings of the International Conference on Compiler Construction (CC98), volume 1883 of LNCS, pages 1-15. Springer, 1998.
W. Gellerich, M. Kosiol, and E. Ploedereder. Where does goto go to? In Reliable Software Technologies - Ada-Europe 1996, volume 1088 of LNCS, pages 385-395. Springer, 1996.
Gnu ada translator (gnat) documentation, 1995. (cs.nyu.edu:/pub/gnat).
G. Goos and J. Hartmanis (eds). The Programming Language Ada Reference Manual. Springer, 1983.
Jensen Si Partners International. TopSpeed Modula-2 Language and Library Reference,1991.
B.W. Kernighan and D.M. Ritchie. The C programming language. Prentice Hall, 2. edition, 1988.
King. N.N. TopSpeed Modula-2 Language Tutorial. Jensen & Partners International, 1991.
D.E. Knuth. An Empirical Study of Fortran Programs. Software - Practice and Experience, 1: 105 - 133, 1971.
D.E. Knuth. Structures Programming with goto Statements. Computing Surveys, 6 (4): 262 - 301, December 1974.
K.C. Louden. Programming Languages. PWS-KENT Publishing Company, 1993.
M. Metcalf and J. Reid. Fortran 90 explained. Oxford University Press, 1992.
P. Naur. GO TO Statement and Good Algol Style. BIT,3(3):204-205, 1963. (Nachdruck in [24]).
P. Naur. Computing: A Human Activity. ACM Press, 1992.
D.J. Reifer. Quantifying the Debate: Ada vs. C++. Crosstalk, (7), July 1996.
F. Rubin. GOTO Considered Harmful Considered Harmful. Communications of the ACM, 30 (3): 195 - 196, March 1987.
R.W. Sebesta. Concepts of Programming Languages. The Benjamin-Cummings Publishing Company, 2. edition, 1993.
W. Van Snyder. Multilevel EXIT and CYCLE arent so bad. ACM SIGPLAN Notices, 22 (5): 20 - 22, May 1987.
B. Stroustrup. The C++ Programming Language. Addison-Wesley, 1993.
S.T. Taft and R.A. Duff. Ada 95 Reference Manual. Springer, 1998. ANSI/ISO /IEC-8652:1995.
W.F. Tichy, P. Lukowicz, Lutz Prechelt, and E.A. Heinz. Experimental Evaluation in Computer Science: A Quantuitative Study. Journal of Systems and Software, 28 (1): 9 - 18, Januar 1995.
N. Wirth. On the composition of well-structured programs. Computing Surveys, 6 (4): 247 - 259, December 1974.
S.F. Zeigler. Comparing Development Costs of C and Ada, March 1995. http://wuarchive.wustl.edu/languages/ada/ajpo/docs/reports/cada/cadaart.html.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Gellerich, W., Ploedereder, E. (1999). The Evolution of GOTO Usage and Its Effects on Software Quality. In: Beiersdörfer, K., Engels, G., Schäfer, W. (eds) Informatik’99. Informatik aktuell. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-01069-3_57
Download citation
DOI: https://doi.org/10.1007/978-3-662-01069-3_57
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66450-5
Online ISBN: 978-3-662-01069-3
eBook Packages: Springer Book Archive