Comparison of programming languages
s are used for controlling the behavior of a machine. Like natural languages, programming languages conform to rules for syntax and semantics.
There are thousands of programming languages 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.
Most programming languages are not standardized by an international standard, even widely used ones, such as Perl or Standard ML. Notable standardized programming languages include ALGOL, C, C++, JavaScript, Smalltalk, Prolog, Common Lisp, Scheme, Ada, Fortran, COBOL, SQL and XQuery.
General comparison
The following table compares general and technical information for a selection of commonly used programming languages. See the individual languages' articles for further information. Please note that the following table may be missing some information.Language | Intended use | Imperative | Object-oriented | Functional | Procedural | Generic | Reflective | Event-driven | Other paradigm | Standardized? | ||||||||||
Application, RAD, business, general, web, mobile | Object-based, Prototype-based programming | |||||||||||||||||||
ActionScript 3.0 | Application, client-side, web | , ECMA | ||||||||||||||||||
Ada | Application, embedded, realtime, system | concurrent, distributed, | , 2005, 2012, ANSI, ISO, GOST 27831-88 | |||||||||||||||||
Aldor | Highly domain-specific, symbolic computing | |||||||||||||||||||
ALGOL 58 | Application | |||||||||||||||||||
ALGOL 60 | Application | , IFIP WG 2.1, ISO | ||||||||||||||||||
ALGOL 68 | Application | concurrent | , IFIP WG 2.1, GOST 27974-88, | |||||||||||||||||
Ateji PX | Parallel application | pi calculus | ||||||||||||||||||
APL | Application, data processing | array-oriented, tacit | , ISO | |||||||||||||||||
Assembly language | General | any, syntax is usually highly specific, related to the target processor | ||||||||||||||||||
AutoHotkey | GUI automation, highly domain-specific | |||||||||||||||||||
AutoIt | GUI automation, highly domain-specific | |||||||||||||||||||
Ballerina | Integration, agile, server-side, general | concurrent, transactional, statically and strongly typed programming, diagrammatic / visual programming | De facto standard via Ballerina Language Specification | |||||||||||||||||
Bash | Shell, scripting | , but optionally POSIX.2 | ||||||||||||||||||
BASIC | Application, education | , ANSI, ISO, ECMA | ||||||||||||||||||
BeanShell | Application, scripting | , JCP | ||||||||||||||||||
BLISS | System | |||||||||||||||||||
BlitzMax | Application, game | |||||||||||||||||||
Boo | Application, game scripting | |||||||||||||||||||
Bro | domain-specific, application | |||||||||||||||||||
C | Application, system, general purpose, low-level operations | , ANSI C89, ISO C90, ISO C99, ISO C11, ISO C18 | ||||||||||||||||||
C++ | Application, system | . ISO/IEC 2003, ISO/IEC 2011,ISO/IEC 2014,ISO/IEC 2017 | ||||||||||||||||||
C# | Application, RAD, business, client-side, general, server-side, web | structured, concurrent | , ECMA, ISO | |||||||||||||||||
Clarion | General, business, web | |||||||||||||||||||
Clean | General | |||||||||||||||||||
Clojure | General | concurrent | ||||||||||||||||||
CLU | General | |||||||||||||||||||
COBOL | Application, business | |||||||||||||||||||
Cobra | Application, business, general, web | |||||||||||||||||||
ColdFusion | Web | |||||||||||||||||||
Common Lisp | General | extensible syntax, , syntactic macros, multiple dispatch, concurrent | , ANSI | |||||||||||||||||
COMAL 80 | Education | |||||||||||||||||||
Crystal | General purpose | alpha stage | ||||||||||||||||||
Curry | Application | lazy evaluation, non-determinism | via Curry Language Report | |||||||||||||||||
Cython | Application, general, numerical computing | aspect-oriented | ||||||||||||||||||
D | Application, system | generative, concurrent | ||||||||||||||||||
Dart | Application, web, server-side, mobile, IoT | structured | ||||||||||||||||||
Dylan | Application | |||||||||||||||||||
Eiffel | General, application, business, client-side, server-side, web | distributed , | , ECMA, ISO | |||||||||||||||||
Elixir | Application, distributed | concurrent, distributed | ||||||||||||||||||
Erlang | Application, distributed | concurrent, distributed | ||||||||||||||||||
Euphoria | Application | |||||||||||||||||||
Factor | General | can be viewed as | stack-oriented | |||||||||||||||||
FP | ||||||||||||||||||||
F# | Application | |||||||||||||||||||
Forth | General | can be viewed as | stack-oriented | , ANSI | ||||||||||||||||
Fortran | Application, numerical computing | array-based, vectorized, concurrent, native distributed/shared-memory parallelism | , ANSI 66, ANSI 77, MIL-STD-1753, ISO 90, ISO 95, ISO 2003, ISO/IEC 1539-1:2010, ISO/IEC JTC1/SC22/WG5 N2145 | |||||||||||||||||
FreeBASIC | Application, numerical computing | |||||||||||||||||||
Gambas | Application | |||||||||||||||||||
Game Maker Language | Application, games | |||||||||||||||||||
GLBasic | Application, games | simple object-oriented | ||||||||||||||||||
Go | Application, web, server-side | concurrent | via Go Language Specification | |||||||||||||||||
Gosu | Application, general, scripting, web | |||||||||||||||||||
GraphTalk | Application | logic | ||||||||||||||||||
Groovy | Application, general, scripting, web | meta-programming | , JCP | |||||||||||||||||
Harbour | Application, business, data processing, general, web | declarative | ||||||||||||||||||
Haskell | Application | lazy evaluation | , Haskell 2010 | |||||||||||||||||
Haxe | Application, general, web | |||||||||||||||||||
HyperNext | Application, education | weakly typed | ||||||||||||||||||
HyperTalk | Application, RAD, general | weakly typed | ||||||||||||||||||
Io | Application, host-driven scripting | |||||||||||||||||||
IPL | General | |||||||||||||||||||
ISLISP | General | , ISO | ||||||||||||||||||
J | Data processing | array-oriented, function-level, tacit | ||||||||||||||||||
JADE | Application, distributed | |||||||||||||||||||
Java | Application, business, client-side, general, mobile development, server-side, web | concurrent | via Java Language Specification | |||||||||||||||||
JavaScript | Client-side, server-side, web | prototype-based | , ECMA | |||||||||||||||||
Joy | Research | stack-oriented | ||||||||||||||||||
Julia | General, technical computing | multiple dispatch, meta, scalar and array-oriented, parallel, concurrent, distributed | ||||||||||||||||||
K | Data processing, business | array-oriented, tacit | ||||||||||||||||||
Kotlin | Application, mobile development, server-side, client-side, web | |||||||||||||||||||
Ksh | Shell, scripting | several variants, custom programmable, dynamic loadable modules | , POSIX.2 | |||||||||||||||||
LabVIEW | Application, industrial instrumentation-automation | dataflow, visual | ||||||||||||||||||
Lisp | General | |||||||||||||||||||
LiveCode | Application, RAD, general | weakly typed | ||||||||||||||||||
Logtalk | Artificial intelligence, application | logic | ||||||||||||||||||
LSL | Virtual worlds content scripting and animation | Scripts exist in in-world objects | ||||||||||||||||||
Lua | Application, embedded scripting | aspect-oriented | ||||||||||||||||||
Maple | Symbolic computation, numerical computing | distributed | ||||||||||||||||||
Mathematica | Symbolic language | logic, distributed | ||||||||||||||||||
MATLAB | Highly domain-specific, numerical computing | |||||||||||||||||||
Modula-2 | Application, system | , ISO | ||||||||||||||||||
Modula-3 | Application | |||||||||||||||||||
MUMPS | Application, databases | concurrent, multi-user, NoSQL, transaction processing | , ANSI | |||||||||||||||||
Nim | Application, general, web, scripting, system | multiple dispatch, Concurrent, meta | ||||||||||||||||||
Oberon | Application, system | |||||||||||||||||||
Object Pascal | Application, general, mobile app, web | structured | ||||||||||||||||||
Objective-C | Application, general | concurrent | ||||||||||||||||||
OCaml | Application, general | |||||||||||||||||||
Occam | General | concurrent, process-oriented | ||||||||||||||||||
Opa | Web applications | distributed | ||||||||||||||||||
OpenLisp | General, Embedded Lisp Engine | , ISO | ||||||||||||||||||
Oxygene | Application | |||||||||||||||||||
Oz-Mozart | Application, distribution, education | concurrent, logic | ||||||||||||||||||
Pascal | Application, education | , ISO | ||||||||||||||||||
Perl | Application, scripting, text processing, Web | |||||||||||||||||||
PHP | Server-side, web application, web | via language specification and Requests for Comments | ||||||||||||||||||
PL/I | Application | , ECMA-50 | ||||||||||||||||||
Plus | Application, system development | |||||||||||||||||||
PostScript | Graphics, page description | concatenative, stack-oriented | , as the PostScript Reference Manual | |||||||||||||||||
PowerShell | Administration, application, general, scripting | pipeline | ||||||||||||||||||
Prolog | Application, artificial intelligence | logic, declarative | , ISO/IEC 13211-1:1995, TC1 2007, TC2 2012, TC3 2017 | |||||||||||||||||
PureBasic | Application | |||||||||||||||||||
Python | Application, general, web, scripting, artificial intelligence, scientific computing | aspect-oriented | via Python Enhancement Proposals | |||||||||||||||||
R | Application, statistics | |||||||||||||||||||
Racket | Education, general, scripting | modular, logic, meta | ||||||||||||||||||
Raku | Scripting, text processing, glue | aspect-oriented, array, lazy evaluation, multiple dispatch, metaprogramming | ||||||||||||||||||
REALbasic | Application | |||||||||||||||||||
Rebol | Distributed | dialected | ||||||||||||||||||
REXX | Scripting | |||||||||||||||||||
RPG | Application, system | |||||||||||||||||||
Ruby | Application, scripting, web | aspect-oriented | ||||||||||||||||||
Rust | Application, system | concurrent | ||||||||||||||||||
S | Application, statistics | |||||||||||||||||||
S-Lang | Application, numerical, scripting | |||||||||||||||||||
Scala | Application, distributed, web | via Scala Language Specification | ||||||||||||||||||
Scheme | Education, general | extensible syntax | , R6RS | |||||||||||||||||
Seed7 | Application, general, scripting, web | multi-paradigm, extensible, structured | ||||||||||||||||||
Simula | Education, general | discrete event simulation, multi-threaded program execution | ||||||||||||||||||
Small Basic | Application, education, games | component-oriented | ||||||||||||||||||
Smalltalk | Application, general, business, artificial intelligence, education, web | concurrent, declarative | , Swift | Application, general | concurrent, declarative, protocol-oriented | |||||||||||||||
Tcl | Application, scripting, web | |||||||||||||||||||
Visual Basic | Application, RAD, education, business, general,, [office automation">Swift (programming language)">Swift | Application, general | concurrent, declarative, protocol-oriented | |||||||||||||||||
Tcl | Application, scripting, web | |||||||||||||||||||
Visual Basic | Application, RAD, education, business, general,, [office automation | component-oriented | ||||||||||||||||||
Application, RAD, education, web, business, general | structured, concurrent | |||||||||||||||||||
Visual FoxPro | Application | data-centric, logic | ||||||||||||||||||
Visual Prolog | Application | declarative, logic | ||||||||||||||||||
Wolfram Language | Symbolic language | logic, distributed | ||||||||||||||||||
XL | concept programming | |||||||||||||||||||
Xojo | Application, RAD, general, web | |||||||||||||||||||
XPath/XQuery | Databases, data processing, scripting | tree-oriented | 1999 XPath 1, 2010 XQuery 1, 2014 XPath/XQuery 3.0 | |||||||||||||||||
Zsh | Shell, scripting | loadable modules |
Type systems
Failsafe I/O and system calls
Most programming languages will print an error message or throw an exception if an input/output operation or other system call fails, unless the programmer has explicitly arranged for different handling of these events. Thus, these languages fail safely in this regard.Some languages require that the programmer explicitly add checks for these kinds of errors. Psychologically, different cognitive biases may affect novice and experts alike and these omissions can lead to erroneous behavior.
Language | Failsafe I/O |
Ada | |
ALGOL | |
AutoHotkey | |
Bash | |
Ballerina | |
Bro | |
C | |
C++ | |
C# | |
COBOL | |
Common Lisp | |
Curry | |
D | |
Eiffel | – It actually depends on the library and it is not defined by the language |
Erlang | |
Fortran | |
GLBasic | – Will generally cause program to crash |
Go | |
Gosu | |
Harbour | |
Haskell | |
ISLISP | |
Java | |
Julia | |
Kotlin | |
LabVIEW | |
Lua | |
Mathematica | |
Object Pascal | |
Objective-C | |
OCaml | |
OpenLisp | |
Perl | |
PHP | |
Python | |
Raku | |
Rebol | |
Rexx | |
RPG | |
Ruby | |
Rust | |
S | |
Smalltalk | |
Scala | |
Standard ML | |
Swift ≥ 2.0 | |
Tcl | |
Visual Basic | |
Visual Basic.NET | |
Visual Prolog | |
Wolfram Language | |
Xojo | |
XPath/XQuery | |
Language | Failsafe I/O |
Expressiveness
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. 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.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.Timeline of specific language comparisons
- 1974 – Comparative Notes on Algol 68 and PL/I – 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.
- 1977 – A comparison of PASCAL and ALGOL 68 – Andrew S. Tanenbaum – June 1977.
- 1993 – Five Little Languages and How They Grew – BLISS, Pascal, ALGOL 68, BCPL & C – Dennis M. Ritchie – April 1993.
- 2009 – On Go – oh, go on – How well will Google's Go stand up against Brand X programming language? – David Given – November 2009