An empirical study of goto in C code.

作者: Romain Robbes , Éric Tanter , Audris Mockus , Meiyappan Nagappan , Shane McIntosh

DOI:

关键词:

摘要: It is nearly 50 years since Dijkstra argued that goto obscures the flow of control in program execution and urged programmers to abandon statement. While past research has shown still use, little known about whether used unrestricted manner feared, if it ‘harmful’ enough be a part post-release bug. We, therefore, conduct two empirical study (1) qualitatively analyze statistically representative sample 384 files from population almost 2 million C programming language collected over 11K Github repositories find developers use for error handling (80.21 ± 5%) cleaning up resources at end procedure (40.36± 5%); (2) quantitatively commit history release branches six OSS projects no statement was removed/modified phase four projects. We conclude limit themselves using appropriately most cases, not an like thus suggesting does appear harmful practice.

参考文章(0)