Comparison of multi-paradigm programming languages
From Wikipedia, the free encyclopedia
Programming languages can be grouped by the number and types of paradigms supported.
Paradigm summaries
A concise reference for the programming paradigms listed in this article.
- Concurrent programming – have language constructs for concurrency, these may involve multi-threading, support for distributed computing, message passing, shared resources (including shared memory), or futures
- Actor programming – concurrent computation with actors that make local decisions in response to the environment (capable of selfish or competitive behaviour)
- Constraint programming – relations between variables are expressed as constraints (or constraint networks), directing allowable solutions (uses constraint satisfaction or simplex algorithm)
- Dataflow programming – forced recalculation of formulas when data values change (e.g. spreadsheets)
- Declarative programming – describes what computation should perform, without specifying detailed state changes cf. imperative programming (functional and logic programming are major subgroups of declarative programming)
- Distributed programming – have support for multiple autonomous computers that communicate via computer networks
- Functional programming – uses evaluation of mathematical functions and avoids state and mutable data
- Generic programming – uses algorithms written in terms of to-be-specified-later types that are then instantiated as needed for specific types provided as parameters
- Imperative programming – explicit statements that change a program state
- Logic programming – uses explicit mathematical logic for programming
- Metaprogramming – writing programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime
- Template metaprogramming – metaprogramming methods in which a compiler uses templates to generate temporary source code, which is merged by the compiler with the rest of the source code and then compiled
- Reflective programming – metaprogramming methods in which a program modifies or extends itself
- Object-oriented programming – uses data structures consisting of data fields and methods together with their interactions (objects) to design programs
- Class-based – object-oriented programming in which inheritance is achieved by defining classes of objects, versus the objects themselves
- Prototype-based – object-oriented programming that avoids classes and implements inheritance via cloning of instances
- Pipeline programming – a simple syntax change to add syntax to nest function calls to language originally designed with none
- Rule-based programming – a network of rules of thumb that comprise a knowledge base and can be used for expert systems and problem deduction & resolution
- Visual programming – manipulating program elements graphically rather than by specifying them textually (e.g. Simulink); also termed diagrammatic programming[1]
Language overview
| Language | Paradigm count |
Concurrent |
Constraints |
Dataflow |
Declarative |
Distributed |
Functional |
Metaprogramming |
Generic |
Imperative |
Logic |
Reflection |
Object-oriented |
Pipelines |
Visual |
Rule-based |
Other |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ada | 5 | Yes | N/a | N/a | N/a | Yes | N/a | N/a | Yes | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| ALF | 2 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | N/a |
| AmigaE [citation needed] | 2 | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| APL | 3 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | N/a | Array (multi-dimensional) |
| BETA [citation needed] | 3 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| C++ | 7 (15) | Yes | Library | Library | Library | Library | Yes | Yes | Yes | Yes | Library | Library | Yes | Library | N/a | Library | Array (multi-dimensional; using STL) |
| C# | 6 (7) | Yes | N/a | Library | N/a | N/a | Yes | N/a | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | Reactive |
| ChucK [citation needed] | 3 | Yes | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| Claire | 2 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| Clojure | 5 | Yes | N/a | N/a | Yes | N/a | Yes | Yes | N/a | N/a | Library | N/a | N/a | Yes | N/a | N/a | Multiple dispatch, |
| Common Lisp | 7 (14) | Library | Library | Library | Yes | Library | Yes | Yes | Yes | Yes | Library | Yes | Yes | Library | Library | Library | Multiple dispatch, meta-OOP system, |
| Curl | 5 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | N/a |
| Curry | 4 | Yes | Yes | N/a | N/a | N/a | Yes | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | N/a |
| D (version 2.0) | 7 | Yes | N/a | N/a | N/a | N/a | Yes | Yes | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | N/a |
| Delphi | 3 | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| Dylan [citation needed] | 3 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a | Yes | Yes | N/a | N/a | N/a | N/a |
| E | 3 | Yes | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| ECMAScript | 4 (5) | Partial | N/a | N/a | Library | N/a | Yes | N/a | N/a | Yes | N/a | Yes | Yes | Library | N/a | N/a | Reactive, |
| Erlang | 3 | Yes | N/a | N/a | Yes | Yes | Yes | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a |
| Elixir | 4 | Yes | N/a | N/a | N/a | Yes | Yes | Yes | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a |
| Elm | 6 | Yes | N/a | Yes | Yes | N/a | Yes (pure) | N/a | Yes | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Reactive |
| F# | 7 (8) | Yes | N/a | Library | Yes | N/a | Yes | N/a | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | Reactive |
| Fortran | 4 (5) | Yes | N/a | N/a | N/a | N/a | Yes | N/a | Yes | N/a | N/a | N/a | Yes | N/a | N/a | N/a | Array (multi-dimensional) |
| Go | 4 | Yes | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | Yes | N/a | Yes | N/a | N/a | N/a |
| Haskell | 8 (15) | Yes | Library | Library | Yes | Library | Yes (lazy) (pure) | Yes | Yes | Yes | Library | N/a | Partial | Yes | Yes | Library | Literate, reactive, dependent types (partial) |
| Io | 4 | Yes | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| J [citation needed] | 3 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| Java | 6 | Yes | Library | Library | N/a | N/a | Yes | N/a | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | N/a |
| Julia | 9 (17) | Yes | Library | Library | Library | Yes | Yes (eager) | Yes | Yes | Yes | Library | Yes | Partial | Yes | N/a | Library | Multiple dispatch, Array (multi-dimensional); optionally lazy |
| Kotlin | 8 | Yes | N/a | N/a | N/a | N/a | Yes | Yes | Yes | Yes | N/a | Yes | Yes | Yes | N/a | N/a | N/a |
| LabVIEW | 4 | Yes | N/a | Yes | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | Yes | N/a | N/a |
| Lava | 2 | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | Yes | N/a | N/a |
| LispWorks (version 6.0 with support for symmetric multi-processing, rules, logic (Prolog), CORBA) | 9 | Yes | N/a | N/a | N/a | Yes | Yes | Yes | N/a | Yes | Yes | Yes | Yes | N/a | N/a | Yes | N/a |
| Lua [citation needed] | 3 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| MATLAB | 6 (10) | Toolbox | Toolbox | Yes | N/a | Toolbox | N/a | Yes | Yes | N/a | N/a | Yes | Yes | N/a | Yes | N/a | Array (multi-dimensional) |
| Nemerle | 7 | Yes | N/a | N/a | N/a | N/a | Yes | Yes | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | N/a |
| Object Pascal | 4 | Yes | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| OCaml | 4 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | Yes | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| Oz | 11 | Yes | Yes | Yes | Yes | Yes | Yes | N/a | N/a | Yes | Yes | N/a | Yes | Yes | N/a | Yes | N/a |
| Perl [citation needed] | 8 (9) | Yes | N/a | Yes | N/a | N/a | Yes | Yes | N/a | Yes | N/a | Yes | Yes | Yes | N/a | N/a | N/a |
| PHP | 4 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | Yes | Yes | N/a | N/a | N/a | N/a |
| Poplog | 3 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | Yes | N/a | N/a | N/a | N/a | N/a | N/a |
| Prograph | 3 | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | Yes | N/a | N/a |
| Python | 5 (10) | Library |
Library |
N/a | N/a | Library |
Yes | Yes |
Yes | Yes | Library | Yes | Yes |
N/a | N/a | N/a | Structured |
| R | 4 (6) | Library | N/a | N/a | N/a | Library | Yes | N/a | N/a | Yes | N/a | Yes | Yes | Yes | N/a | N/a | Array (multi-dimensional) |
| Racket | 10 | Yes | Yes | Yes | N/a | Yes | Yes | Yes | N/a | Yes | Yes | Yes | Yes | N/a | N/a | N/a | Lazy |
| Raku | 10 | Yes | Library | Yes | N/a | Library | Yes | Yes | Yes | Yes | N/a | Yes | Yes | Yes | N/a | N/a | Multiple dispatch, lazy lists, reactive. |
| ROOP | 3 | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | Yes | N/a | N/a | N/a | N/a | Yes | N/a |
| Ruby | 5 | N/a | N/a | N/a | N/a | N/a | Yes | Yes | N/a | Yes | N/a | Yes | Yes | N/a | N/a | N/a | N/a |
| Rust (version 1.0.0-alpha) | 6 | Yes | N/a | N/a | N/a | N/a | Yes | Yes | Yes | Yes | N/a | N/a | Yes | N/a | N/a | N/a | Linear, affline, and ownership types |
| Sather [citation needed] | 2 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| Scala | 9 | Yes | N/a | Yes | Yes | N/a | Yes | Yes | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | N/a |
| Simula [citation needed] | 2 | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| SISAL | 3 | Yes | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a | N/a |
| Spreadsheets | 2 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a |
| Swift | 7 | Yes | N/a | N/a | N/a | N/a | Yes | Yes | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | Block-structured |
| Tcl with Snit extension [citation needed] | 3 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | Yes | N/a | N/a | N/a | N/a |
| Visual Basic .NET | 6 (7) | Yes | N/a | Library | N/a | N/a | Yes | N/a | Yes | Yes | N/a | Yes | Yes | N/a | N/a | N/a | Reactive |
| Windows PowerShell | 6 | N/a | N/a | N/a | N/a | N/a | Yes | N/a | Yes | Yes | N/a | Yes | Yes | Yes | N/a | N/a | N/a |
| Wolfram Language & Mathematica | 13 |
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | N/a | Yes | Knowledge Based |
See also
- Carbon (programming language) — multi-paradigm language being developed at Google to be a successor to C++
- Programming paradigm
- List of programming languages by type
- Domain-specific language
- Domain-specific multimodeling
Notes
- rendezvous and monitor-like based
- class-based
- template metaprogramming
- using TPL Dataflow
- multiple dispatch, method combinations
- actor programming
- promises, native extensions
- using Node.js' cluster module or child_process.fork method, web workers in the browser, etc.
- Prototype-based
- in browsers via their native EventTarget API
- purely functional
- parameterized classes
- immutable
- Uses structs with function polymorphism and multiple dispatch
- Akka Archived 2013-01-19 at the Wayback Machine