Analyzing Class Usage in Java']JavaScript Programs

被引:0
作者
Nishiura, Kinari [1 ]
Misawa, Shuto [2 ]
Monden, Akito [3 ]
机构
[1] Kyoto Inst Technol, Fac Informat & Human Sci, Kyoto, Japan
[2] Okayama Univ, Grad Sch Nat Sci & Technol, Okayama, Japan
[3] Okayama Univ, Grad Sch Environm Life Nat Sci & Technol, Okayama, Japan
来源
6TH WORLD SYMPOSIUM ON SOFTWARE ENGINEERING, WSSE 2024 | 2024年
关键词
mining software repositories; software metrics; GitHub; object-oriented programming; static analysis;
D O I
10.1145/3698062.3698081
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
JavaScript is originally a prototype-based, object-oriented language, but in 2015, ECMAScript 2015 (ES2015) introduced a syntax sugar that enables the class-based programming style. However, the use of the class syntax is not mandatory, and it is not clear to what extent classes are used in practice. It is also possible to use both the class-based style and the prototype-based style together, or to write a program like a procedural language without using either of them. In this study, we analyse 636 JavaScript projects developed since the introduction of the class syntax to determine the actual usage of classes. The result of our analysis shows that 51.3% of the projects use the class syntax, which is higher than the percentage of projects that use only the prototype syntax without the class syntax, indicating that JavaScript project development is shifting from prototype-based to class-based.
引用
收藏
页码:139 / 143
页数:5
相关论文
共 10 条
[1]  
[Anonymous], 2015, Ecmascript 2015 language specification
[2]  
Collberg C. S., 2007, Softw. Pract. Exp., V37
[3]  
Ecma International, ECMAScript 2024 Language Specification
[4]  
Ecma International, ECMAScript 2022 Language Specification
[5]  
Flanagan D., 2000, JavaScript
[6]  
MDN, Object.prototype.proto
[7]   An Analysis of the Dynamic Behavior of Java']Java Script Programs [J].
Richards, Gregor ;
Lebresne, Sylvain ;
Burg, Brian ;
Vitek, Jan .
PLDI '10: PROCEEDINGS OF THE 2010 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2010, :1-12
[8]  
Silva LH, 2015, 2015 22ND INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), P73, DOI 10.1109/SANER.2015.7081817
[9]  
SlashData, STATE OF THE DEVELOPER NATION 25TH EDITION
[10]  
Wittern E, 2016, 13TH WORKING CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2016), P351, DOI [10.1145/2901739.2901743, 10.1109/MSR.2016.043]