There are thousands of programming languages[1] and new ones are created every year. Few languages ever become sufficiently popular that they are used by more than a few people, but professional programmers may use dozens of languages in a career.
The following table compares general and technical information for a selection of commonly used programming languages. See the individual languages' articles for further information.
Most programming languages will print an error message or throw an exception if an input/output operation or other system call (e.g., chmod, kill) fails, unless the programmer has explicitly arranged for different handling of these events. Thus, these languages fail safely in this regard.
Some (mostly older) languages require that programmers explicitly add checks for these kinds of errors. Psychologically, different cognitive biases (e.g., optimism bias) may affect novices and experts alike and lead them to skip these checks. This can lead to erroneous behavior.
No Failsafe I/O:
AutoHotkey (global ErrorLevel must be explicitly checked), C,[47]COBOL, Eiffel (it actually depends on the library and it is not defined by the language), GLBasic (will generally cause program to crash), RPG, Lua (some functions do not warn or throw exceptions), and Perl.[48]
The literature on programming languages contains an abundance of informal claims about their relative expressive power, but there is no framework for formalizing such statements nor for deriving interesting consequences.[52] This table provides two measures of expressiveness from two different sources. An additional measure of expressiveness, in GZip bytes, can be found on the Computer Language Benchmarks Game.[53]
Benchmarks
Barplot of log-time to produce a 1600² Mandelbrot[54] as reported in The Benchmarks Game[55]
Benchmarks are designed to mimic a particular type of workload on a component or system. The computer programs used for compiling some of the benchmark data in this section may not have been fully optimized, and the relevance of the data is disputed. The most accurate benchmarks are those that are customized to your particular situation. Other people's benchmark data may have some value to others, but proper interpretation brings many challenges. The Computer Language Benchmarks Game site warns against over-generalizing from benchmark data, but contains a large number of micro-benchmarks of reader-contributed code snippets, with an interface that generates various charts and tables comparing specific programming languages and types of tests.[56]
Timeline of specific language comparisons
1974 – Comparative Notes on Algol 68 and PL/I[57] – S. H. Valentine – November 1974
1976 – Evaluation of ALGOL 68, JOVIAL J3B, Pascal, Simula 67, and TACPOL Versus TINMAN – Requirements for a Common High Order Programming Language.
^"Codewalk: First-Class Functions in Go". Go supports first class functions, higher-order functions, user-defined function types, function literals, closures, and multiple return values. This rich feature set supports a functional programming style in a strongly typed language.
^"M8 is out!". 2 July 2014. As a first peek into the future reflective capabilities of Kotlin, you can now access properties as first-class objects in Kotlin
^Halcyon (Inworldz) and Open Sims propose compatible implementations with additional functions.
^Lua does not have explicit "object" type (more general type of "table" is used for object definition), but does have explicit syntax for object method calling
^Version releases are accompanied with a definitive Lua Reference Manual showing full syntax and semantics; a reference implementation, and a test suite. These are used to generate other Lua VM implementations and compilers such as Kahlua and LLVM-Lua.
^Scala runs on the Java Virtual Machine from which it inherits the runtime exception handling.
^ abgcc can warn on unchecked errno. Newer versions of Visual Studio usually throw exceptions on failed I/O when using stdio.
^Considerable error checking can be enabled optionally, but by default Perl is not failsafe.
^set -e enables termination if any unchecked exit status is nonzero.
^Data from McConnell, Steve (30 November 2009). Code Complete. Microsoft Press. p. 100. ISBN9780735636972. The Statements ratio column "shows typical ratios of source statements in several high-level languages to the equivalent code in C. A higher ratio means that each line of code in the language listed accomplishes more than does each line of code in C.
^The ratio of line count tests won by each language to the number won by C when using the Compare to feature at McLoone, Jon (November 14, 2012). "Code Length Measured in 14 Languages". Archived from the original on 2012-11-19. C gcc was used for C, C++ g++ was used for C++, FORTRAN G95 was used for FORTRAN, Java JDK Server was used for Java, and Smalltalk GST was used for Smalltalk.
^Felleisen, Matthias. On the Expressive Power of Programming Languages. ESOP '90 3rd European Symposium on Programming. CiteSeerX10.1.1.51.4656.