DocumentCode
1607024
Title
A Comparative Study of Programming Languages in Rosetta Code
Author
Nanz, Sebastian ; Furia, Carlo A.
Author_Institution
Dept. of Comput. Sci., ETH Zurich, Zurich, Switzerland
Volume
1
fYear
2015
Firstpage
778
Lastpage
788
Abstract
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.
Keywords
Java; authoring languages; functional languages; object-oriented programming; program compilers; program interpreters; statistical analysis; C#; F#; Go; Haskell; Java; Python; Rosetta Code; Ruby; code repository; functional language; language interpretation; object-oriented language; procedural language; programming languages; scripting language; statistical analysis; strongly-typed language compilation; Indexes; Java; Programming; Runtime; Standards; Statistical analysis;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Engineering (ICSE), 2015 IEEE/ACM 37th IEEE International Conference on
Conference_Location
Florence
Type
conf
DOI
10.1109/ICSE.2015.90
Filename
7194625
Link To Document