To CamelCase or under_score

To CamelCase or under_score
复制标题

驼峰命名法或下划线

DOI:
10.1109/icpc.2019.00035
复制
发表时间:
2019
期刊:
2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC)
影响因子:
--
通讯作者:
Christopher Morrell
Christopher Morrell
中科院分区:
--
文献类型:
--
作者:
D. Binkley;Marcia Davis;Dawn J Lawrie;Christopher Morrell

文献摘要

被引文献

相似文献

通常采用编程约定是为了提高程序的理解能力。两种最流行的约定是组成多字标识符的替代方法:使用下划线和使用骆驼大小写。虽然大多数程序员对哪种风格更好有自己的看法,但经验研究为他们之间的选择提供了更合适的基础。这里考虑的中心假设是,标识符风格影响操纵程序的速度和准确性。为了更好地理解标识符样式对代码可读性的影响,对135名程序员和非程序员进行了实证研究。这项实验建立在其他研究自然语言阅读者如何完成这些任务的人过去的工作基础上。结果表明,骆驼套管导致更高的准确率在所有科目,无论培训,和那些受过训练的骆驼套管能够识别标识符的骆驼情况下的风格比标识符的下划线风格。
Naming conventions are generally adopted in an effort to improve program comprehension. Two of the most popular conventions are alternatives for composing multi-word identifiers: the use of underscores and the use of camel casing. While most programmers have a personal opinion as to which style is better, empirical study forms a more appropriate basis for choosing between them. The central hypothesis considered herein is that identifier style affects the speed and accuracy of manipulating programs. An empirical study of 135 programmers and non-programmers was conducted to better understand the impact of identifier style on code readability. The experiment builds on past work of others who study how readers of natural language perform such tasks. Results indicate that camel casing leads to higher accuracy among all subjects regardless of training, and those trained in camel casing are able to recognize identifiers in the camel case style faster than identifiers in the underscore style.