Comparison of multi-paradigm programming languages
(Redirected from Multi-paradigm programming language)
This article possibly contains original research. (August 2009) |
Programming languages can be grouped by the number and types of paradigms supported.
Paradigm summaries
[edit | edit source]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
[edit | edit source]| Language | Paradigm count
|
Concurrent
|
Constraints
|
Dataflow
|
Declarative
|
Distributed
|
Functional
|
Metaprogramming
|
Generic
|
Imperative
|
Logic
|
Reflection
|
Object-oriented
|
Pipelines
|
Visual
|
Rule-based
|
Other |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ada |
5 | Yes |
— | — | — | Yes | — | — | Yes | Yes | — | — | Yes |
— | — | — | — |
| ALF | 2 | — | — | — | — | — | Yes | — | — | — | Yes | — | — | — | — | — | — |
| AmigaE [citation needed] |
2 | — | — | — | — | — | — | — | — | Yes | — | — | Yes |
— | — | — | — |
| APL | 3 | — | — | — | — | — | Yes | — | — | Yes | — | — | — | — | — | — | Array (multi-dimensional) |
| BETA [citation needed] |
3 | — | — | — | — | — | Yes | — | — | Yes | — | — | Yes |
— | — | — | — |
| C++ | 7 (15) | Yes |
Library |
Library |
Library |
Library |
Yes | Yes |
Yes |
Yes | Library |
Library |
Yes |
Library |
— | Library |
Array (multi-dimensional; using STL) |
| C# | 6 (7) | Yes | — | Library |
— | — | Yes |
— | Yes | Yes | — | Yes | Yes |
— | — | — | Reactive |
| ChucK [citation needed] |
3 | Yes | — | — | — | — | — | — | — | Yes | — | — | Yes |
— | — | — | — |
| Claire | 2 | — | — | — | — | — | Yes | — | — | — | — | — | Yes |
— | — | — | — |
| Clojure | 5 | Yes |
— | — | Yes | — | Yes |
Yes |
— | — | Library |
— | — | Yes |
— | — | 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 | — | — | — | — | — | Yes | — | Yes |
Yes | — | Yes | Yes |
— | — | — | — |
| Curry | 4 | Yes | Yes | — | — | — | Yes | — | — | — | Yes | — | — | — | — | — | — |
| D (version 2.0) |
7 | Yes |
— | — | — | — | Yes | Yes |
Yes |
Yes | — | Yes | Yes |
— | — | — | — |
| Delphi | 3 | — | — | — | — | — | — | — | Yes |
Yes | — | — | Yes |
— | — | — | — |
| Dylan [citation needed] |
3 | — | — | — | — | — | Yes | — | — | — | — | Yes | Yes |
— | — | — | — |
| E | 3 | Yes | — | — | — | Yes | — | — | — | — | — | — | Yes |
— | — | — | — |
| ECMAScript |
4 (5) | Partial |
— | — | Library |
— | Yes | — | — | Yes | — | Yes | Yes |
Library |
— | — | Reactive, |
| Erlang | 3 | Yes | — | — | Yes | Yes | Yes | — | — | — | — | — | — | Yes | — | — | — |
| Elixir | 4 | Yes | — | — | — | Yes | Yes | Yes | — | — | — | — | — | Yes | — | — | — |
| Elm | 6 | Yes | — | Yes | Yes | — | Yes (pure) |
— | Yes | — | — | — | — | Yes | — | — | Reactive |
| F# | 7 (8) | Yes |
— | Library |
Yes | — | Yes | — | Yes | Yes | — | Yes | Yes |
— | — | — | Reactive |
| Fortran | 4 (5) | Yes | — | — | — | — | Yes |
— | Yes |
— | — | — | Yes |
— | — | — | Array (multi-dimensional) |
| Go | 4 | Yes | — | — | — | — | — | — | — | Yes | — | Yes | — | Yes | — | — | — |
| Haskell | 8 (15) | Yes | Library |
Library |
Yes | Library |
Yes (lazy) (pure) |
Yes |
Yes | Yes | Library |
— | Partial |
Yes | Yes | Library |
Literate, reactive, dependent types (partial) |
| Io | 4 | Yes |
— | — | — | — | Yes | — | — | Yes | — | — | Yes |
— | — | — | — |
| J [citation needed] |
3 | — | — | — | — | — | Yes | — | — | Yes | — | — | Yes |
— | — | — | — |
| Java | 6 | Yes | Library |
Library |
— | — | Yes | — | Yes | Yes | — | Yes | Yes |
— | — | — | — |
| Julia | 9 (17) | Yes | Library |
Library |
Library |
Yes | Yes (eager) | Yes | Yes | Yes | Library |
Yes | Partial |
Yes | — | Library |
Multiple dispatch, Array (multi-dimensional); optionally lazy |
| Kotlin | 8 | Yes | — | — | — | — | Yes | Yes | Yes | Yes | — | Yes | Yes | Yes | — | — | — |
| LabVIEW | 4 | Yes | — | Yes | — | — | — | — | — | — | — | — | Yes | — | Yes | — | — |
| Lava | 2 | — | — | — | — | — | — | — | — | — | — | — | Yes |
— | Yes | — | — |
| LispWorks (version 6.0 with support for symmetric multi-processing, rules, logic (Prolog), CORBA) | 9 | Yes | — | — | — | Yes | Yes | Yes | — | Yes | Yes | Yes | Yes |
— | — | Yes | — |
| Lua [citation needed] |
3 | — | — | — | — | — | Yes | — | — | Yes | — | — | Yes |
— | — | — | — |
| MATLAB | 6 (10) | Toolbox |
Toolbox |
Yes |
— | Toolbox |
— | Yes |
Yes |
— | — | Yes |
Yes |
— | Yes |
— | Array (multi-dimensional) |
| Nemerle | 7 | Yes | — | — | — | — | Yes | Yes | Yes | Yes | — | Yes | Yes |
— | — | — | — |
| Object Pascal | 4 | Yes | — | — | — | — | Yes | — | — | Yes | — | — | Yes |
— | — | — | — |
| OCaml | 4 | — | — | — | — | — | Yes | — | Yes | Yes | — | — | Yes |
— | — | — | — |
| Oz | 11 | Yes | Yes | Yes | Yes | Yes | Yes | — | — | Yes | Yes | — | Yes |
Yes | — | Yes | — |
| Perl [citation needed] |
8 (9) | Yes |
— | Yes |
— | — | Yes | Yes | — | Yes | — | Yes |
Yes |
Yes | — | — | — |
| PHP |
4 | — | — | — | — | — | Yes | — | — | Yes | — | Yes | Yes |
— | — | — | — |
| Poplog | 3 | — | — | — | — | — | Yes | — | — | Yes | Yes | — | — | — | — | — | — |
| Prograph | 3 | — | — | Yes | — | — | — | — | — | — | — | — | Yes |
— | Yes | — | — |
| Python | 5 (10) | Library |
Library |
— | — | Library |
Yes | Yes |
Yes |
Yes | Library |
Yes | Yes |
— | — | — | Structured |
| R | 4 (6) | Library |
— | — | — | Library |
Yes | — | — | Yes | — | Yes | Yes | Yes |
— | — | Array (multi-dimensional) |
| Racket | 10 | Yes |
Yes |
Yes |
— | Yes |
Yes | Yes | — | Yes | Yes | Yes | Yes | — | — | — | Lazy |
| Raku | 10 | Yes |
Library |
Yes |
— | Library |
Yes | Yes |
Yes |
Yes | — | Yes |
Yes |
Yes | — | — | Multiple dispatch, lazy lists, reactive. |
| ROOP | 3 | — | — | — | — | — | — | — | — | Yes | Yes | — | — | — | — | Yes | — |
| Ruby | 5 | — | — | — | — | — | Yes | Yes | — | Yes | — | Yes | Yes |
— | — | — | — |
| Rust (version 1.0.0-alpha) | 6 | Yes |
— | — | — | — | Yes | Yes |
Yes |
Yes | — | — | Yes | — | — | — | Linear, affline, and ownership types |
| Sather [citation needed] |
2 | — | — | — | — | — | Yes | — | — | — | — | — | Yes |
— | — | — | — |
| Scala |
9 | Yes |
— | Yes |
Yes | — | Yes | Yes | Yes | Yes | — | Yes | Yes |
— | — | — | — |
| Simula [citation needed] |
2 | — | — | — | — | — | — | — | — | Yes | — | — | Yes |
— | — | — | — |
| SISAL | 3 | Yes | — | Yes | — | — | Yes | — | — | — | — | — | — | — | — | — | — |
| Spreadsheets | 2 | — | — | — | — | — | Yes | — | — | — | — | — | — | — | Yes | — | — |
| Swift | 7 | Yes | — | — | — | — | Yes | Yes | Yes | Yes | — | Yes | Yes |
— | — | — | Block-structured |
| Tcl with Snit extension [citation needed] |
3 | — | — | — | — | — | Yes |
— | — | Yes | — | — | Yes |
— | — | — | — |
| Visual Basic .NET | 6 (7) | Yes | — | Library |
— | — | Yes | — | Yes | Yes | — | Yes | Yes |
— | — | — | Reactive |
| Windows PowerShell | 6 | — | — | — | — | — | Yes | — | Yes | Yes | — | Yes | Yes |
Yes | — | — | — |
| Wolfram Language & Mathematica | 13 |
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
— | Yes | Knowledge Based |
See also
[edit | edit source]- 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
[edit | edit source]- ^ rendezvous and monitor-like based
- ^ a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai class-based
- ^ a b c d e template metaprogramming
- ^ a b c using TPL Dataflow
- ^ only lambda support (lazy functional programming)
- ^ a b c using Reactive Extensions (Rx)
- ^ multiple dispatch, method combinations
- ^ a b c d e actor programming
- ^ promises, native extensions
- ^ using Node.js' cluster module or child_process.fork method, web workers in the browser, etc.
- ^ a b c d Prototype-based
- ^ using Reactive Extensions (RxJS)
- ^ in Node.js via their events module
- ^ in browsers via their native EventTarget API
- ^ a b c purely functional
- ^ parameterized classes
- ^ immutable
- ^ Uses structs with function polymorphism and multiple dispatch
- ^ Akka Archived 2013-01-19 at the Wayback Machine
Citations
[edit | edit source]- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3, Section 9: Tasks and Synchronization
- ^ Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3 Annex E: Distributed Systems
- ^ Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3, Section 12: Generic Units
- ^ Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3, Section 6: Subprograms
- ^ Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3, 3.9 Tagged Types and Type Extensions
- ^ Thread support
- ^ Atomics support
- ^ Memory model
- ^ Gecode
- ^ SystemC
- ^ Boost.Iostreams
- ^ Boolinq
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ OpenMPI
- ^ Boost.MPI
- ^ Boost.MPL
- ^ LC++
- ^ Castor Archived 2013-01-25 at the Wayback Machine
- ^ Reflect Library
- ^ N3534
- ^ Boost.Spirit
- ^ Clojure - Concurrent Programming
- ^ Clojure - core.async
- ^ Clojure - Functional Programming
- ^ Clojure - Macros
- ^ Clojure - core.logic
- ^ Clojure - Threading Macros Guide
- ^ Multimethods and Hierarchies
- ^ Agents and Asynchronous Actions
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ [1] constraint programming inside CL through extensions
- ^ [2] dataflow extension
- ^ [3] by creating DSLs using the built-in metaprogramming; also see note on functional, constraint and logic paradigms, which are part of declarative
- ^ [4] MPI, etc via language extensions
- ^ template metaprogramming using macros (see C++)
- ^ [5] [6] [7] Prolog implemented as a language extension
- ^ Common Lisp Object System see Wikipedia article on CLOS, the Common Lisp Object System.
- ^ implemented by the user via a short macro, example of implementation
- ^ - Visual programming tool based on Common Lisp
- ^ [8] rule-based programming extension
- ^ [9] Archived 2018-04-26 at the Wayback Machine through the Meta Object Protocol
- ^ D Language Feature Table
- ^ Phobos std.algorithm
- ^ D language String Mixins
- ^ The Little JavaScripter demonstrates fundamental commonality with Scheme, a functional language.
- ^ Object-Oriented Programming in JavaScript Archived 2019-02-10 at the Wayback Machine gives an overview of object-oriented programming techniques in JavaScript.
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Cloud Haskell
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ https://jcp.org/en/jsr/detail?id=331 JSR 331: Constraint Programming API
- ^ https://github.com/GoogleCloudPlatform/DataflowJavaSDK Google Cloud Platform Dataflow SDK
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ https://github.com/davidanthoff/Query.jl Query almost anything in julia
- ^ https://github.com/lilinjn/LilKanren.jl A collection of Kanren implementations in Julia
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lazy https://github.com/MikeInnes/Lazy.jl
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ interpreter based threads
- ^ Higher Order Perl
- ^ PHP Manual, Chapter 17. Functions
- ^ PHP Manual, Chapter 19. Classes and Objects (PHP 5)
- ^ PHP Manual, Anonymous functions
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Racket Guide: Concurrency and Synchronization
- ^ The Rosette Guide
- ^ FrTime: A Language for Reactive Programs
- ^ Racket Guide: Distributed Places
- ^ Lazy Racket
- ^ Channels and other mechanisms
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Feed operator
- ^ https://github.com/perl6/doc/issues/1744#issuecomment-360565196 Cro module
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ https://perl6advent.wordpress.com/2009/12/18/day-18-roles/ Parametrized Roles
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ https://docs.perl6.org/language/classtut Classes and Roles
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ The Rust Reference §6.1.3.1
- ^ An Overview of the Scala Programming Language
- ^ Scala Language Specification
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Notes for Programming Language Experts, Wolfram Language Documentation.
- ^ External Programs, Wolfram Language Documentation.
References
[edit | edit source]- Jim Coplien, Multiparadigm Design for C++, Addison-Wesley Professional, 1998.