Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Comparison of multi-paradigm programming languages
List article

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 c.f. 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 programming1

Language overview

List of multi-paradigm programming languages
LanguageParadigm countConcurrentConstraintsDataflowDeclarativeDistributedFunctionalMetaprogrammingGenericImperativeLogicReflectionObject-orientedPipelinesVisualRule-basedOther
Ada234565Yes7YesYesYesYes8
ALF2YesYes
AmigaE2YesYes9
APL3YesYesArray (multi-dimensional)
BETA3YesYesYes10
C++7 (15)Yes111213Library14Library1516Library1718Library1920YesYes21Yes22YesLibrary2324Library25Yes26Yes27Library28Array (multi-dimensional; using STL)
C#6 (7)YesLibrary29Yes30YesYesYesYes31Reactive32
ChucK3YesYesYes33
Claire2YesYes34
Clojure5Yes3536YesYes37Yes38Library39Yes40Editor41Multiple dispatch,42 Agents43
Common Lisp7 (14)Library44Library45Library46Yes47Library48YesYesYes49YesLibrary50YesYes515253Library54Library55Library56Multiple dispatch, meta-OOP system,57 Language is extensible via metaprogramming.
Curl5YesYes58YesYesYes59
Curry4YesYesYesYes
D (version 2.0)60617Yes62YesYes6364Yes65YesYesYes66
Delphi3Yes67YesYes68
Dylan3YesYesYes69
E3YesYesYes70
ECMAScript7172 (ActionScript, E4X, JavaScript, JScript)4 (5)Partial7374Library7576YesYesYesYes77Library7879Editor80Reactive,8182 event driven8384
Erlang3YesYesYesYesYes
Elixir4YesYesYesYesYes
Elm6YesYesYesYes (pure)85YesYesReactive
F#7 (8)Yes86Library87YesYesYesYesYesYes88Reactive89
Fortran4 (5)YesYes90Yes91Yes92Array (multi-dimensional)
Go4YesYesYesYes
Haskell8 (15)YesLibrary93Library94YesLibrary95Yes (lazy) (pure)96Yes97YesYesLibrary98Partial99YesYesLibrary100Literate, reactive, dependent types (partial)
Io4Yes101YesYesYes102
J3YesYesYes103
Java6YesLibrary104Library105YesYesYesYesYes106
Julia9 (17)YesLibrary107Library108109Library110YesYes (eager)YesYesYesLibrary111YesPartial112YesLibrary113114Multiple dispatch,Array (multi-dimensional); optionally lazy115 and reactive (with libraries)
Kotlin8YesYesYesYesYesYesYesYes
LabVIEW4YesYesYesYes
Lava2Yes116Yes
LispWorks (version 6.0 with support for symmetric multi-processing, rules, logic (Prolog), CORBA)9YesYesYesYesYesYesYesYes117Yes
Lua3YesYesYes118
MATLAB6 (10)Toolbox119Toolbox120Yes121Toolbox122Yes123Yes124Yes125Yes126Yes127Array (multi-dimensional)
Nemerle7YesYesYesYesYesYesYes128
Object Pascal4YesYesYesYes129
OCaml4YesYesYesYes130
Oz11YesYesYesYesYesYesYesYesYes131YesYes
Perl8 (9)Yes132Yes133YesYesYesYes134Yes135Yes
PHP1361371384YesYesYesYes139
Poplog3YesYesYes
Prograph3YesYes140Yes
Python5 (10)Library141142Library143Library144YesYes145146Yes147148YesLibrary149YesYes150Editor151Structured
R4 (6)Library152Library153YesYesYesYesYes154Array (multi-dimensional)
Racket10Yes155Yes156Yes157Yes158YesYesYesYesYesYesLazy159
Raku10Yes160Library161Yes162Library163YesYes164Yes165YesYes166Yes167YesMultiple dispatch, lazy lists, reactive.
ROOP3YesYesYes
Ruby5YesYesYesYesYes168
Rust (version 1.0.0-alpha)6Yes169YesYes170171Yes172YesYesLinear, affline, and ownership types
Sather2YesYes173
Scala1741759Yes176Yes177YesYesYesYesYesYesYes178
Simula2YesYes179
SISAL3YesYesYes
Spreadsheets2YesYes
Swift7YesYesYesYesYesYesYes180Block-structured
Tcl with Snit extension3Yes181YesYes182183
Visual Basic .NET6 (7)YesLibrary184YesYesYesYesYes185Reactive186
Windows PowerShell6YesYesYesYesYes187Yes
Wolfram Language & Mathematica13188 (14)YesYesYesYesYesYesYesYesYesYesYesYesYes189YesKnowledge Based

See also

Notes

Citations

  • Jim Coplien, Multiparadigm Design for C++, Addison-Wesley Professional, 1998.

References

  1. Bragg, S.D.; Driskill, C.G. (20–22 September 1994). "Diagrammatic-graphical programming languages and DoD-STD-2167A". Proceedings of AUTOTESTCON '94 (IEEEXplore). Institute of Electrical and Electronics Engineers (IEEE). pp. 211–220. doi:10.1109/AUTEST.1994.381508. ISBN 978-0-7803-1910-3. S2CID 62509261. 978-0-7803-1910-3

  2. Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3, Section 9: Tasks and Synchronization http://www.adaic.org/standards/05rm/html/RM-TTL.html

  3. Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3 Annex E: Distributed Systems http://www.adaic.org/standards/05rm/html/RM-TTL.html

  4. Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3, Section 12: Generic Units http://www.adaic.org/standards/05rm/html/RM-TTL.html

  5. Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3, Section 6: Subprograms http://www.adaic.org/standards/05rm/html/RM-TTL.html

  6. Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3, 3.9 Tagged Types and Type Extensions http://www.adaic.org/standards/05rm/html/RM-TTL.html

  7. rendezvous and monitor-like based

  8. class-based

  9. class-based

  10. class-based

  11. Thread support http://en.cppreference.com/w/cpp/thread

  12. Atomics support http://en.cppreference.com/w/cpp/atomic

  13. Memory model https://cppandbeyond.wordpress.com/2011/04/11/session-announcement-the-c0x-memory-model-and-why-you-care

  14. Gecode http://www.gecode.org/

  15. SystemC http://www.accellera.org/downloads/standards/systemc/about_systemc/

  16. Boost.Iostreams http://www.boost.org/libs/iostreams/

  17. Boolinq https://code.google.com/p/boolinq/

  18. "AraRat" (PDF). Archived from the original (PDF) on 2019-08-19. Retrieved 2019-09-15. https://web.archive.org/web/20190819105358/http://www.cs.technion.ac.il/~lkeren/scp.pdf

  19. OpenMPI http://www.open-mpi.org/

  20. Boost.MPI http://www.boost.org/libs/mpi/

  21. Boost.MPL http://www.boost.org/libs/mpl/

  22. template metaprogramming

  23. LC++ http://cgi.di.uoa.gr/~smaragd/lc++/

  24. Castor Archived 2013-01-25 at the Wayback Machine http://www.mpprogramming.com/Cpp/Default.aspx

  25. Reflect Library https://bytemaster.github.com/boost_reflect/

  26. class-based

  27. N3534 http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3534.html

  28. Boost.Spirit http://www.boost.org/libs/spirit/

  29. using TPL Dataflow http://msdn.microsoft.com/en-us/devlabs/gg585582.aspx

  30. only lambda support (lazy functional programming) /wiki/Lambda_calculus

  31. class-based

  32. using Reactive Extensions (Rx) http://msdn.microsoft.com/en-us/data/gg577609.aspx

  33. class-based

  34. class-based

  35. Clojure - Concurrent Programming https://clojure.org/about/concurrent_programming

  36. Clojure - core.async https://github.com/clojure/core.async

  37. Clojure - Functional Programming https://clojure.org/about/functional_programming

  38. Clojure - Macros https://clojure.org/reference/macros

  39. Clojure - core.logic https://github.com/clojure/core.logic/

  40. Clojure - Threading Macros Guide https://clojure.org/guides/threading_macros

  41. "Light Table". 2019-04-08. http://lighttable.com/

  42. Multimethods and Hierarchies https://clojure.org/reference/multimethods

  43. Agents and Asynchronous Actions https://clojure.org/reference/agents

  44. "concurrency". CLiki. https://www.cliki.net/Concurrency

  45. [1] constraint programming inside CL through extensions https://www.cliki.net/screamer

  46. [2] dataflow extension https://www.cliki.net/Cells

  47. [3] by creating DSLs using the built-in metaprogramming; also see note on functional, constraint and logic paradigms, which are part of declarative http://www.gigamonkeys.com/book/practical-an-html-generation-library-the-interpreter.html

  48. [4] MPI, etc via language extensions https://www.cliki.net/Distributed

  49. template metaprogramming using macros (see C++)

  50. [5] [6] [7] Prolog implemented as a language extension https://www.cliki.net/Prolog

  51. multiple dispatch, method combinations

  52. class-based

  53. Common Lisp Object System see Wikipedia article on CLOS, the Common Lisp Object System. /wiki/Common_Lisp_Object_System

  54. implemented by the user via a short macro, example of implementation http://blog.vjeux.com/2011/lisp/lisp-chaining-operator.html

  55. - Visual programming tool based on Common Lisp https://github.com/honix/Lire

  56. [8] rule-based programming extension http://lisa.sourceforge.net/

  57. [9] Archived 2018-04-26 at the Wayback Machine through the Meta Object Protocol https://common-lisp.net/project/ecl/static/manual/ch31.html

  58. template metaprogramming

  59. class-based

  60. D Language Feature Table http://www.digitalmars.com/d/2.0/comparison.html

  61. Phobos std.algorithm http://www.digitalmars.com/d/2.0/phobos/std_algorithm.html

  62. actor programming

  63. D language String Mixins http://dlang.org/mixin.html

  64. template metaprogramming

  65. template metaprogramming

  66. class-based

  67. template metaprogramming

  68. class-based

  69. class-based

  70. class-based

  71. The Little JavaScripter demonstrates fundamental commonality with Scheme, a functional language. http://www.crockford.com/javascript/little.html

  72. Object-Oriented Programming in JavaScript Archived 2019-02-10 at the Wayback Machine gives an overview of object-oriented programming techniques in JavaScript. http://mckoss.com/jscript/object.htm

  73. promises, native extensions

  74. using Node.js' cluster module or child_process.fork method, web workers in the browser, etc. /wiki/Node.js

  75. "React – A JavaScript library for building user interfaces". 2019-04-08. https://reactjs.org/

  76. "TNG-Hooks". GitHub. 2019-04-08. https://github.com/getify/tng-hooks

  77. Prototype-based

  78. "Lodash documentation". 2019-04-08. https://lodash.com/docs/4.17.11#flow

  79. "mori". 2019-04-08. https://swannodette.github.io/mori/#pipeline

  80. "Light Table". 2019-04-08. http://lighttable.com/

  81. using Reactive Extensions (RxJS) http://reactivex.io/rxjs/

  82. "TNG-Hooks". GitHub. 2019-04-08. https://github.com/getify/tng-hooks

  83. in Node.js via their events module https://nodejs.org/api/events.html

  84. in browsers via their native EventTarget API https://developer.mozilla.org/en-US/docs/Web/API/EventTarget

  85. purely functional

  86. actor programming

  87. using TPL Dataflow http://msdn.microsoft.com/en-us/devlabs/gg585582.aspx

  88. class-based

  89. using Reactive Extensions (Rx) http://msdn.microsoft.com/en-us/data/gg577609.aspx

  90. purely functional

  91. parameterized classes

  92. class-based

  93. "Prolog embedding". Haskell.org. https://hackage.haskell.org/package/hswip

  94. "Functional Reactive Programming". HaskellWiki. https://wiki.haskell.org/Functional_Reactive_Programming

  95. Cloud Haskell https://haskell-distributed.github.io/

  96. purely functional

  97. "Template Haskell". HaskellWiki. https://wiki.haskell.org/Template_Haskell

  98. "Logict: A backtracking logic-programming monad". Haskell.org. https://hackage.haskell.org/package/logict

  99. immutable

  100. Kollmansberger, Steve; Erwig, Martin (30 May 2006). "Haskell Rules: Embedding Rule Systems in Haskell" (PDF). Oregon State University. https://web.engr.oregonstate.edu/~erwig/HaskellRules/HaskellRules_June06.pdf

  101. actor programming

  102. Prototype-based

  103. class-based

  104. https://jcp.org/en/jsr/detail?id=331 JSR 331: Constraint Programming API https://jcp.org/en/jsr/detail?id=331

  105. https://github.com/GoogleCloudPlatform/DataflowJavaSDK Google Cloud Platform Dataflow SDK https://github.com/GoogleCloudPlatform/DataflowJavaSDK

  106. class-based

  107. "JuliaOpt/JuMP.jl". GitHub. JuliaOpt. 11 February 2020. Retrieved 12 February 2020. https://github.com/JuliaOpt/JuMP.jl

  108. "GitHub - MikeInnes/DataFlow.jl". GitHub. 2019-01-15. https://github.com/MikeInnes/DataFlow.jl

  109. "GitHub - JuliaGizmos/Reactive.jl: Reactive programming primitives for Julia". GitHub. 2018-12-28. https://github.com/JuliaGizmos/Reactive.jl

  110. https://github.com/davidanthoff/Query.jl Query almost anything in julia https://github.com/davidanthoff/Query.jl

  111. https://github.com/lilinjn/LilKanren.jl A collection of Kanren implementations in Julia https://github.com/lilinjn/LilKanren.jl

  112. Uses structs with function polymorphism and multiple dispatch

  113. "GitHub - abeschneider/PEGParser.jl: PEG Parser for Julia". GitHub. 2018-12-03. https://github.com/abeschneider/PEGParser.jl

  114. "GitHub - gitfoxi/Parsimonious.jl: A PEG parser generator for Julia". GitHub. 2017-08-03. https://github.com/gitfoxi/Parsimonious.jl

  115. Lazy https://github.com/MikeInnes/Lazy.jl https://github.com/MikeInnes/Lazy.jl

  116. class-based

  117. class-based

  118. Prototype-based

  119. "Execute loop iterations in parallel". mathworks.com. Retrieved 21 October 2016. http://mathworks.com/help/distcomp/parfor.html

  120. "Write Constraints". mathworks.com. Retrieved 21 October 2016. https://mathworks.com/help/optim/write-constraints.html

  121. "Getting Started with SimEvents". mathworks.com. Retrieved 21 October 2016. https://mathworks.com/help/simevents/getting-started-with-simevents.html

  122. "Execute loop iterations in parallel". mathworks.com. Retrieved 21 October 2016. http://mathworks.com/help/distcomp/parfor.html

  123. "Execute MATLAB expression in text - MATLAB eval". mathworks.com. Retrieved 21 October 2016. https://mathworks.com/help/matlab/ref/eval.html

  124. "Determine class of object". mathworks.com. Retrieved 21 October 2016. https://mathworks.com/help/matlab/ref/class.html

  125. "Class Metadata". mathworks.com. Retrieved 21 October 2016. https://mathworks.com/help/matlab/get-information-about-classes-and-objects.html

  126. "Object-Oriented Programming". mathworks.com. Retrieved 21 October 2016. https://mathworks.com/help/matlab/object-oriented-programming.html

  127. "Simulink". mathworks.com. Retrieved 21 October 2016. https://mathworks.com/help/simulink/

  128. class-based

  129. class-based

  130. class-based

  131. class-based

  132. interpreter based threads http://perldoc.perl.org/threads.html

  133. Higher Order Perl http://hop.perl.plover.com/book/

  134. class-based

  135. class-based

  136. PHP Manual, Chapter 17. Functions http://php.net/manual/en/index.php

  137. PHP Manual, Chapter 19. Classes and Objects (PHP 5) http://php.net/manual/en/index.php

  138. PHP Manual, Anonymous functions http://php.net/manual/en/index.php

  139. class-based

  140. class-based

  141. "Parallel Processing and Multiprocessing in Python". Python Wiki. Retrieved 21 October 2016. https://wiki.python.org/moin/ParallelProcessing

  142. "threading — Higher-level threading interface". docs.python.org. Retrieved 21 October 2016. https://docs.python.org/2/library/threading.html

  143. "python-constraint". pypi.python.org. Retrieved 21 October 2016. https://pypi.python.org/pypi/python-constraint

  144. "DistributedProgramming". Python Wiki. Retrieved 21 October 2016. https://wiki.python.org/moin/DistributedProgramming

  145. "Chapter 9. Metaprogramming". chimera.labs.oreilly.com. Archived from the original on 23 October 2016. Retrieved 22 October 2016. https://web.archive.org/web/20161023050954/http://chimera.labs.oreilly.com/books/1230000000393/ch09.html

  146. "Metaprogramming". readthedocs.io. Retrieved 22 October 2016. https://python-3-patterns-idioms-test.readthedocs.io/en/latest/Metaprogramming.html

  147. "PEP 443 – Single-dispatch generic functions". python.org. Retrieved 22 October 2016. https://www.python.org/dev/peps/pep-0443/

  148. "PEP 484 – Type Hints". python.org. Retrieved 22 October 2016. https://www.python.org/dev/peps/pep-0484/#generics

  149. "PyDatalog". Retrieved 22 October 2016. https://sites.google.com/site/pydatalog/

  150. class-based

  151. "Light Table". 2019-04-08. http://lighttable.com/

  152. "Futureverse". https://www.futureverse.org/

  153. "future batchtools". https://future.batchtools.futureverse.org/

  154. "Magrittr: A Forward Pipe Operator for R". cran.r-project.org\access-date=13 July 2017. 17 November 2020. https://cran.r-project.org/package=magrittr

  155. Racket Guide: Concurrency and Synchronization https://docs.racket-lang.org/guide/concurrency.html

  156. The Rosette Guide https://docs.racket-lang.org/rosette-guide/

  157. FrTime: A Language for Reactive Programs https://docs.racket-lang.org/frtime/

  158. Racket Guide: Distributed Places https://docs.racket-lang.org/guide/parallelism.html#%28part._distributed-places%29

  159. Lazy Racket https://docs.racket-lang.org/lazy/

  160. Channels and other mechanisms https://docs.perl6.org/language/concurrency

  161. "Problem Solver module". https://raku.land/github:FCO/ProblemSolver

  162. Feed operator https://docs.perl6.org/routine/==%3E

  163. https://github.com/perl6/doc/issues/1744#issuecomment-360565196 Cro module https://github.com/perl6/doc/issues/1744#issuecomment-360565196

  164. "Meta-programming: What, why and how". 2011-12-14. https://perl6advent.wordpress.com/2011/12/14/meta-programming-what-why-and-how/

  165. https://perl6advent.wordpress.com/2009/12/18/day-18-roles/ Parametrized Roles https://perl6advent.wordpress.com/2009/12/18/day-18-roles/

  166. "Meta-object protocol (MOP)". https://docs.perl6.org/language/mop

  167. https://docs.perl6.org/language/classtut Classes and Roles https://docs.perl6.org/language/classtut

  168. class-based

  169. actor programming

  170. "The Rust macros guide". Rust. Retrieved 19 January 2015. http://doc.rust-lang.org/1.0.0-alpha/book/macros.html

  171. "The Rust compiler plugins guide". Rust. Retrieved 19 January 2015. http://doc.rust-lang.org/1.0.0-alpha/book/plugins.html

  172. The Rust Reference §6.1.3.1 http://doc.rust-lang.org/1.0.0-alpha/reference.html#generic-functions

  173. class-based

  174. An Overview of the Scala Programming Language http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaOverview.pdf

  175. Scala Language Specification https://wayback.archive-it.org/all/20171003043151/http://www.scala-lang.org/sites/default/files/linuxsoft_archives/docu/files/ScalaReference.pdf

  176. actor programming

  177. Akka Archived 2013-01-19 at the Wayback Machine http://doc.akka.io/docs/akka/snapshot/scala/dataflow.html

  178. class-based

  179. class-based

  180. class-based

  181. "Tcl Programming/Introduction". en.wikibooks.org. Retrieved 22 October 2016. https://en.wikibooks.org/wiki/Tcl_Programming/Introduction#One_language.2C_many_styles

  182. Prototype-based

  183. "TCLLIB - Tcl Standard Library: snitfaq". sourceforge.net. Retrieved 22 October 2016. http://tmml.sourceforge.net/doc/tcllib/snitfaq.html

  184. using TPL Dataflow http://msdn.microsoft.com/en-us/devlabs/gg585582.aspx

  185. class-based

  186. using Reactive Extensions (Rx) http://msdn.microsoft.com/en-us/data/gg577609.aspx

  187. class-based

  188. Notes for Programming Language Experts, Wolfram Language Documentation. http://www.wolfram.com/language/for-experts/

  189. External Programs, Wolfram Language Documentation. https://reference.wolfram.com/language/tutorial/ExternalPrograms.html