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 条
  • [21] Addressing security issues in programming languages for mobile code
    Gritzalis, S
    Iliadis, J
    NINTH INTERNATIONAL WORKSHOP ON DATABASE AND EXPERT SYSTEMS APPLICATIONS, PROCEEDINGS, 1998, : 288 - 293
  • [22] A comparative study of programming languages for next-generation astrodynamics systems
    Eichhorn, Helge
    Cano, Juan Luis
    McLean, Frazer
    Anderl, Reiner
    CEAS SPACE JOURNAL, 2018, 10 (01) : 115 - 123
  • [23] A Comparative Study of Eight Constraint Programming Languages Over the Boolean and Finite Domains
    Fernández A.J.
    Hill P.M.
    Fernandez, Antonio J., 2000, Kluwer Academic Publishers, Dordrecht, Netherlands (05) : 275 - 301
  • [24] Modeling Meets Programming: A Comparative Study in Model Driven Engineering Action Languages
    Elaasar, Maged
    Badreddin, Omar
    LEVERAGING APPLICATIONS OF FORMAL METHODS, VERIFICATION AND VALIDATION: DISCUSSION, DISSEMINATION, APPLICATIONS, ISOLA 2016, PT II, 2016, 9953 : 50 - 67
  • [25] Investigating the Performance of Language Models for Completing Code in Functional Programming Languages: a Haskell Case Study
    van Dam, Tim
    van der Heijden, Frank
    de Bekker, Philippe
    Nieuwschepen, Berend
    Otten, Marc
    Izadi, Maliheh
    arXiv,
  • [26] Investigating the Performance of Language Models for Completing Code in Functional Programming Languages: a Haskell Case Study
    Van Dam, Tim
    Van der Heijden, Frank
    De Bekker, Philippe
    Nieuwschepen, Berend
    Otten, Marc
    Izadi, Maliheh
    PROCEEDINGS 2024 IEEE/ACM FIRST INTERNATIONAL CONFERENCE ON AI FOUNDATION MODELS AND SOFTWARE ENGINEERING, FORGE 2024, 2024, : 91 - 102
  • [27] Comparative performance study of parallel programming models in a neural network training code
    Vitela, JE
    Hanebutte, UR
    Gordillo, JL
    Cortina, LM
    INTERNATIONAL JOURNAL OF MODERN PHYSICS C, 2002, 13 (04): : 429 - 452
  • [28] INDUSTRIAL ROBOT PROGRAMMING LANGUAGES: A COMPARATIVE EVALUATION.
    Gruver, William A.
    Soroka, Barry I.
    Craig, John J.
    Turner, Timothy L.
    IEEE Transactions on Systems, Man and Cybernetics, 1984, SMC-14 (04): : 565 - 570
  • [29] Measuring source code conciseness across programming languages using compression
    Bergmans, Lodewijk
    Schrijen, Xander
    Ouwehand, Edwin
    Bruntink, Magiel
    IEEE 21ST INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2021), 2021, : 47 - 57
  • [30] Quantum programming languages: A tentative study
    XU JiaFu & SONG FangMin State Key Laboratory for Novel Software Technology
    ScienceinChina(SeriesF:InformationSciences), 2008, (06) : 623 - 637