arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1401.5300cs.SEcs.PL
收藏

在开源软件中标识符是如何命名的?关于流行和一致性

How are identifiers named in open source software? About popularity and consistency

Yanqing Wang, Chong Wang, Xiaojie Li, Sijing Yun, Minjing Song

摘要:

随着软件项目规模和维护成本的快速增长,如何遵循编码标准,特别是如何管理标识符命名,正引起计算机科学教育工作者和软件管理人员的迫切关注。软件开发人员主要使用标识符名称来表示源代码中记录的知识。然而,标识符命名约定的流行性和采用一致性尚未在该领域得到揭示。以48个流行的开源项目为例,开发了一个基于正则表达式匹配的标识符提取工具,该工具使用三种顶级程序设计语言Java、C和C++编写。在随后的调查中,得到了一些有趣的发现。在标识符命名流行度方面,Camel和Pascal命名规范正处于领先地位,而匈牙利符号正在消失。对于标识符命名的一致性,我们发现用Java编写的项目比用C和C++编写的项目具有更好的性能。最后,建议学术界和软件产业界在实践中统一采用最流行的命名规范,使标识符命名走上规范、统一、高质量的道路。

英文摘要:

With the rapid increasing of software project size and maintenance cost, adherence to coding standards especially by managing identifier naming, is attracting a pressing concern from both computer science educators and software managers. Software developers mainly use identifier names to represent the knowledge recorded in source code. However, the popularity and adoption consistency of identifier naming conventions have not been revealed yet in this field. Taking forty-eight popular open source projects written in three top-ranking programming languages Java, C and C++ as examples, an identifier extraction tool based on regular expression matching is developed. In the subsequent investigation, some interesting findings are obtained. For the identifier naming popularity, it is found that Camel and Pascal naming conventions are leading the road while Hungarian notation is vanishing. For the identifier naming consistency, we have found that the projects written in Java have a much better performance than those written in C and C++. Finally, academia and software industry are urged to adopt the most popular naming conventions consistently in their practices so as to lead the identifier naming to a standard, unified and high-quality road.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑