A Comparative Study of Programming Languages in Rosetta Code

被引:69
|
作者
Nanz, Sebastian [1 ]
Furia, Carlo A. [1 ]
机构
[1] Swiss Fed Inst Technol, Dept Comp Sci, Chair Software Engn, Zurich, Switzerland
关键词
D O I
10.1109/ICSE.2015.90
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Sometimes debates on programming languages are more religious than scientific. Questions about which language is more succinct or efficient, or makes developers more productive are discussed with fervor, and their answers are too often based on anecdotes and unsubstantiated beliefs. In this study, we use the largely untapped research potential of Rosetta Code, a code repository of solutions to common programming tasks in various languages, which offers a large data set for analysis. Our study is based on 7'087 solution programs corresponding to 745 tasks in 8 widely used languages representing the major programming paradigms (procedural: C and Go; object-oriented: C# and Java; functional: F# and Haskell; scripting: Python and Ruby). Our statistical analysis reveals, most notably, that: functional and scripting languages are more concise than procedural and object-oriented languages; C is hard to beat when it comes to raw speed on large inputs, but performance differences over inputs of moderate size are less pronounced and allow even interpreted languages to be competitive; compiled strongly-typed languages, where more defects can be caught at compile time, are less prone to runtime failures than interpreted or weakly-typed languages. We discuss implications of these results for developers, language designers, and educators.
引用
收藏
页码:778 / 788
页数:11
相关论文
共 50 条
  • [31] Study and evaluation of music programming languages
    de Araujo, Rodrigo Ramos
    da Silva Sandy, Jose Mauro
    Reioli Cirilo, Elder Jose
    Schiavoni, Flavio Luiz
    REVISTA VORTEX-VORTEX MUSIC JOURNAL, 2018, 6 (02):
  • [32] Quantum programming languages: A tentative study
    Xu JiaFu
    Song FangMin
    SCIENCE IN CHINA SERIES F-INFORMATION SCIENCES, 2008, 51 (06): : 623 - 637
  • [33] Quantum programming languages: A tentative study
    JiaFu Xu
    FangMin Song
    Science in China Series F: Information Sciences, 2008, 51
  • [34] Context in the study of human languages and computer programming languages: A comparison
    Connolly, JH
    MODELING AND USING CONTEXT, PROCEEDINGS, 2001, 2116 : 116 - 128
  • [35] A comparative study of high-productivity high-performance programming languages for parallel metaheuristics
    Gmys, Jan
    Carneiro, Tiago
    Melab, Nouredine
    Talbi, El-Ghazali
    Tuyttens, Daniel
    SWARM AND EVOLUTIONARY COMPUTATION, 2020, 57 (57)
  • [36] A "ROSETTA STONE" MATRIX FOR THE GENETIC CODE
    Negadi, Tidjani
    SYMMETRY-CULTURE AND SCIENCE, 2022, 33 (03): : 249 - 266
  • [37] INDUSTRIAL ROBOT PROGRAMMING-LANGUAGES - A COMPARATIVE-EVALUATION
    GRUVER, WA
    SOROKA, BI
    CRAIG, JJ
    TURNER, TL
    IEEE TRANSACTIONS ON SYSTEMS MAN AND CYBERNETICS, 1984, 14 (04): : 565 - 570
  • [38] A COMPARATIVE STUDY OF CAUCASIAN LANGUAGES
    Gozalova, Marina Robertovna
    Gazilov, Magomed Gazilovich
    Abdulkadirov, Umalt Umarovich
    REVISTA ENTRELINGUAS, 2022, 8
  • [39] Procedural Code Generation vs Static Expansion in Modelling Languages for Constraint Programming
    Martin, Julien
    Martinez, Thierry
    Fages, Francois
    RECENT ADVANCES IN CONSTRAINTS, CSCLP 2009, 2011, 6384 : 38 - 58
  • [40] One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarization
    Wang, Deze
    Chen, Boxing
    Li, Shanshan
    Luo, Wei
    Peng, Shaoliang
    Dong, Wei
    Liao, Xiangke
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ICSE, 2023, : 5 - 16