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 条
  • [1] Code Readability Management of High-level Programming Languages: A Comparative Study
    Tariq, Muhammad Usman
    Bashir, Muhammad Bilal
    Babar, Muhammad
    Sohail, Adnan
    INTERNATIONAL JOURNAL OF ADVANCED COMPUTER SCIENCE AND APPLICATIONS, 2020, 11 (03) : 595 - 602
  • [2] COMPARATIVE STUDY OF CAI PROGRAMMING LANGUAGES
    ZINN, KL
    EDUCATIONAL TECHNOLOGY, 1968, 8 (12) : 14 - 16
  • [3] On the Impact of Programming Languages on Code Quality: A Reproduction Study
    Berger, Emery D.
    Hollenbeck, Celeste
    Maj, Petr
    Vitek, Olga
    Vitek, Jan
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2019, 41 (04):
  • [4] Programming languages for mobile code
    Thorn, T
    ACM COMPUTING SURVEYS, 1997, 29 (03) : 213 - 239
  • [5] Programming languages for mobile code
    Inria/Irisa, Rennes, France
    ACM Comput Surv, 3 (213-239):
  • [6] Programming Languages For Generative Design: A Comparative Study
    Leitao, Antonio
    Santos, Luis
    Lopes, Jose
    INTERNATIONAL JOURNAL OF ARCHITECTURAL COMPUTING, 2012, 10 (01) : 140 - 162
  • [7] COMPARATIVE STUDY OF PROGRAMMING LANGUAGES - HIGMAN,B
    不详
    AMERICAN DOCUMENTATION, 1969, 20 (02): : 175 - 175
  • [8] HIGMAN,B - A COMPARATIVE STUDY OF PROGRAMMING LANGUAGES
    WILKES, MV
    CONTROL, 1967, 11 (113): : 555 - +
  • [9] Programming languages for generative design: A comparative study
    Leitão, A. (antonio.menezes.leitao@ist.utl.pt), 1600, Multi-Science Publishing Co. Ltd (10):
  • [10] Cloud Programming Languages and Infrastructure from Code: An Empirical Study
    Simhandl, Georg
    Zdun, Uwe
    PROCEEDINGS OF THE 17TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON SOFTWARE LANGUAGE ENGINEERING, SLE 2024, 2024, : 143 - 156