Comparison of multi-paradigm programming languages
Programming paradigms |
---|
|
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 behavior)
- 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 a computation should perform, without specifying detailed state changes c.f. imperative programming (functional and logic programming are major subgroups of declarative programing)
- 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 templates are used by a compiler 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 | Number of Paradigms | Concurrent | Constraints | Dataflow | Declarative | Distributed | Functional | Metaprogramming | Generic | Imperative | Logic | Reflection | Object-oriented | Pipelines | Visual | Rule-based | Other paradigms |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ada[2][3][4][5][6] | 5 | Yes[a 1] | No | No | No | Yes | No | No | Yes | Yes | No | No | Yes[a 2] | No | No | No | No |
ALF | 2 | No | No | No | No | No | Yes | No | No | No | Yes | No | No | No | No | No | No |
AmigaE | 2 | No | No | No | No | No | No | No | No | Yes | No | No | Yes[a 2] | No | No | No | No |
APL | 3 | No | No | No | No | No | Yes | No | No | Yes | No | No | No | No | No | No | Array (multi-dimensional) |
BETA | 3 | No | No | No | No | No | Yes | No | No | Yes | No | No | Yes[a 2] | No | No | No | No |
C++ | 7 (15) | Yes[7][8][9] | Library[10] | Library[11][12] | Library[13][14] | Library[15][16] | Yes | Yes[17] | Yes[a 3] | Yes | Library[18][19] | Library[20] | Yes[a 2] | Yes[21] | No | Library[22] | Array (multi-dimensional; using STL) |
C# | 6 (7) | Yes | No | Library[a 4] | No | No | Yes[a 5] | No | Yes | Yes | No | Yes | Yes[a 2] | No | No | No | reactive[a 6] |
ChucK | 3 | Yes | No | No | No | No | No | No | No | Yes | No | No | Yes[a 2] | No | No | No | No |
Claire | 2 | No | No | No | No | No | Yes | No | No | No | No | No | Yes[a 2] | No | No | No | No |
Common Lisp | 5 | Library[23] | Library[24] | Library[25] | Yes[26] | Library[27] | Yes | Yes | Yes[28] | Yes | Library[29] | Yes | Yes (multiple dispatch, method combinations)[30][a 2] | Library[31] | No | Library[32] | Multiple dispatch, meta-OOP system[33], Language is extensible via metaprogramming. |
Curl | 5 | No | No | No | No | No | Yes | No | Yes[a 3] | Yes | No | Yes | Yes[a 2] | No | No | No | No |
Curry | 4 | Yes | Yes | No | No | No | Yes | No | No | No | Yes | No | No | No | No | No | No |
D (version 2.0)[34][35] | 6 | Yes[a 7] | No | No | No | No | Yes | Yes[36][a 3] | Yes[a 3] | Yes | No | No | Yes[a 2] | No | No | No | No |
Dylan | 3 | No | No | No | No | No | Yes | No | No | No | No | Yes | Yes[a 2] | No | No | No | No |
E | 3 | Yes | No | No | No | Yes | No | No | No | No | No | No | Yes[a 2] | No | No | No | No |
ECMAScript[37][38] (ActionScript, E4X, JavaScript, JScript) | 4 (5) | partial (promises, native extensions)[a 8] | No | No | No | No | Yes | No | No | Yes | No | Yes | Yes[a 9] | No | No | No | reactive[a 10] |
Embarcadero Delphi | 3 | No | No | No | No | No | No | No | Yes[a 3] | Yes | No | No | Yes[a 2] | No | No | No | No |
Erlang | 3 | Yes | No | No | No | Yes | Yes | No | No | No | No | No | No | Yes | No | No | No |
Elixir | 4 | Yes | No | No | No | Yes | Yes | Yes | No | No | No | No | No | Yes | No | No | No |
Elm | 6 | Yes | No | Yes | Yes | No | Yes | No | Yes | No | No | No | No | Yes | No | No | reactive |
F# | 7 (8) | Yes[a 7] | No | Library[a 4] | Yes | No | Yes | No | Yes | Yes | No | Yes | Yes[a 2] | No | No | No | reactive[a 6] |
Falcon | 4 | No | No | No | No | No | Yes | Yes | No | No | No | Yes | Yes[a 2] | No | No | No | No |
Fortran | 4 (5) | Yes | No | No | No | No | Yes[a 11] | No | Yes[a 12] | No | No | No | Yes[a 2] | No | No | No | Array (multi-dimensional) |
Go | 4 | Yes | No | No | No | No | No | No | No | Yes | No | Yes | No | Yes | No | No | No |
Haskell | 2? | Yes | Library[39] | No | Yes | Library[40] | Yes (lazy) | No | Yes | Yes | No | No | No | No | Yes | No | Template:Reactive, dependent types (partial) |
Io | 4 | Yes[a 7] | No | No | No | No | Yes | No | No | Yes | No | No | Yes[a 9] | No | No | No | No |
J | 3 | No | No | No | No | No | Yes | No | No | Yes | No | No | Yes[a 2] | No | No | No | No |
Java | 6 | Yes | Library[41] | Library[42] | No | No | Yes | No | Yes | Yes | No | Yes | Yes[a 2] | No | No | No | No |
Julia | 9 (17) | Yes | Library[43] | Library[44][45] | Library[46] | Yes | Yes (eager) | Yes | Yes | Yes | Library[47] | Yes | Yes (multiple dispatch, not traditional single) | Yes | No | Library[48][49] | Multiple dispatch, Array (multi-dimensional); optionally lazy[50] and reactive (with libraries) |
Kotlin | 8 | Yes | No | No | No | No | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | No | No | No |
LabVIEW | 4 | Yes | No | Yes | No | No | No | No | No | No | No | No | Yes | No | Yes | No | No |
Lava | 2 | No | No | No | No | No | No | No | No | No | No | No | Yes[a 2] | No | Yes | No | No |
Leda | 4 | No | No | No | No | No | Yes | No | No | Yes | Yes | No | Yes[a 2] | No | No | No | No |
LispWorks (version 6.0 with support for symmetric multi-processing, rules, logic (Prolog), CORBA) | 9 | Yes | No | No | No | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes[a 2] | No | No | Yes | No |
Lua | 3 | No | No | No | No | No | Yes | No | No | Yes | No | No | Yes[a 9] | No | No | No | No |
MATLAB | 6 (10) | Toolbox[51] | Toolbox[52] | Yes[53] | No | Toolbox[54] | No | Yes[55] | Yes[56] | No | No | Yes[57] | Yes[58] | No | Yes[59] | No | Array (multi-dimensional) |
Nemerle | 7 | Yes | No | No | No | No | Yes | Yes | Yes | Yes | No | Yes | Yes[a 2] | No | No | No | No |
Object Pascal | 4 | Yes | No | No | No | No | Yes | No | No | Yes | No | No | Yes[a 2] | No | No | No | No |
OCaml | 4 | No | No | No | No | No | Yes | No | Yes | Yes | No | No | Yes[a 2] | No | No | No | No |
Oz | 11 | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes | Yes | No | Yes[a 2] | Yes | No | Yes | No |
Perl | 8 (9) | Yes[60] | Library[61] | Yes[62] | No | No | Yes | Yes | No | Yes | No | Yes[a 2] | Yes[a 2] | Yes | No | No | No |
Perl6 | 10 | Yes[63] | Yes[64] | Yes[65] | No | Library[66] | Yes | Yes[67] | Yes[68] | Yes | No | Yes[69] | Yes[70] | Yes | No | No | Multiple dispatch, lazy lists, reactive. |
PHP[71][72][73] | 4 | No | No | No | No | No | Yes | No | No | Yes | No | Yes | Yes[a 2] | No | No | No | No |
Poplog | 3 | No | No | No | No | No | Yes | No | No | Yes | Yes | No | No | No | No | No | No |
Prograph | 3 | No | No | Yes | No | No | No | No | No | No | No | No | Yes[a 2] | No | Yes | No | No |
Python | 5 (10) | Library[74][75] | Library[76] | No | No | Library[77] | Partial | Yes[78][79] | Yes[80][81] | Yes | Library[82] | Yes | Yes[a 2] | No | No | No | structured |
R | 4 | No | No | No | No | No | Yes | No | No | Yes | No | Yes | Yes | Yes[83] | No | No | Array (multi-dimensional) |
Racket | 6 | No | No | No | No | No | Yes | Yes | No | Yes | Yes | Yes | Yes | No | No | No | No |
ROOP | 3 | No | No | No | No | No | No | No | No | Yes | Yes | No | No | No | No | Yes | No |
Ruby | 4 | No | No | No | No | No | Yes | No | No | Yes | No | Yes | Yes[a 2] | No | No | No | No |
Rust (version 1.0.0-alpha) | 6 | Yes[a 7] | No | No | No | No | Yes | Yes[84][85] | Yes[86] | Yes | No | No | Yes | No | No | No | linear, affline, and ownership types |
Sather | 2 | No | No | No | No | No | Yes | No | No | No | No | No | Yes[a 2] | No | No | No | No |
Scala[87][88] | 9 | Yes[a 7] | No | Yes[a 13] | Yes | No | Yes | Yes | Yes | Yes | No | Yes | Yes[a 2] | No | No | No | No |
Simula | 2 | No | No | No | No | No | No | No | No | Yes | No | No | Yes[a 2] | No | No | No | No |
SISAL | 3 | Yes | No | Yes | No | No | Yes | No | No | No | No | No | No | No | No | No | No |
Spreadsheets | 2 | No | No | No | No | No | Yes | No | No | No | No | No | No | No | Yes | No | No |
Swift | 7 | Yes | No | No | No | No | Yes | Yes | Yes | Yes | No | Yes | Yes[a 2] | No | No | No | block-structured |
Tcl with Snit extension | 3 | No | No | No | No | No | Yes[89] | No | No | Yes | No | No | Yes[a 9][90] | No | No | No | No |
Visual Basic .NET | 6 (7) | Yes | No | Library[a 4] | No | No | Yes | No | Yes | Yes | No | Yes | Yes[a 2] | No | No | No | reactive[a 6] |
Windows PowerShell | 6 | No | No | No | No | No | Yes | No | Yes | Yes | No | Yes | Yes[a 2] | Yes | No | No | No |
Wolfram Language & Mathematica | 13[91] (14) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes[92] | No | Yes | Knowledge Based |
See also
Notes
- ↑ rendezvous and monitor-like based
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 Class-based
- 1 2 3 4 5 Template metaprogramming
- 1 2 3 using TPL Dataflow
- ↑ only lambda support (lazy functional programming)
- 1 2 3 using Reactive Extensions (Rx)
- 1 2 3 4 5 actor programming
- ↑ using Node.js' cluster module or child_process.fork method, web workers in the browser, etc.
- 1 2 3 4 Prototype-based
- ↑ using Reactive Extensions (RxJS)
- ↑ purely functional
- ↑ parameterized classes
- ↑ Akka Archived 2013-01-19 at the Wayback Machine.
Citations
- ↑ Bragg, S.D.; Driskill, C.G. (20–22 September 1994). "Diagrammatic-graphical programming languages and DoD-STD-2167A". IEEEXplore. IEEE.
- ↑ 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
- ↑ AraRat
- ↑ OpenMPI
- ↑ Boost.MPI
- ↑ Boost.MPL
- ↑ LC++
- ↑ Castor Archived 2013-01-25 at the Wayback Machine.
- ↑ Reflect Library
- ↑ N3534
- ↑ Boost.Spirit
- ↑ many concurrency paradigms implemented as language extensions
- ↑ constraint programming inside CL through extensions
- ↑ dataflow extension
- ↑ by creating DSLs using the built-in metaprogramming; also see note on functional, constraint and logic paradigms, which are part of declarative
- ↑ MPI, etc via language extensions
- ↑ template metaprogramming using macros (see C++)
- ↑ 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:
- ↑ rule-based programming extension
- ↑ 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 gives an overview of object-oriented programming techniques in JavaScript.
- ↑ Prolog embedding
- ↑ Cloud Haskell
- ↑ https://jcp.org/en/jsr/detail?id=331 JSR 331: Constraint Programming API
- ↑ https://github.com/GoogleCloudPlatform/DataflowJavaSDK Google Cloud Platform Dataflow SDK
- ↑ https://jump.readthedocs.io/en/latest/
- ↑ https://github.com/MikeInnes/DataFlow.jl
- ↑ https://github.com/JuliaGizmos/Reactive.jl
- ↑ https://github.com/davidanthoff/Query.jl Query almost anything in julia
- ↑ https://github.com/lilinjn/LilKanren.jl A collection of Kanren implementations in Julia
- ↑ https://github.com/abeschneider/PEGParser.jl
- ↑ https://github.com/gitfoxi/Parsimonious.jl
- ↑ Lazy https://github.com/MikeInnes/Lazy.jl
- ↑ "Execute loop iterations in parallel". mathworks.com. Retrieved 21 October 2016.
- ↑ "Write Constraints". mathworks.com. Retrieved 21 October 2016.
- ↑ "Getting Started with SimEvents". mathworks.com. Retrieved 21 October 2016.
- ↑ "Execute loop iterations in parallel". mathworks.com. Retrieved 21 October 2016.
- ↑ "Execute MATLAB expression in text - MATLAB eval". mathworks.com. Retrieved 21 October 2016.
- ↑ "Determine class of object". mathworks.com. Retrieved 21 October 2016.
- ↑ "Class Metadata". mathworks.com. Retrieved 21 October 2016.
- ↑ "Object-Oriented Programming". mathworks.com. Retrieved 21 October 2016.
- ↑ "Simulink". mathworks.com. Retrieved 21 October 2016.
- ↑ interpreter based threads
- ↑ Moose
- ↑ Higher Order Perl
- ↑ Channels and other mechanisms
- ↑
- ↑ Feed operator
- ↑ https://github.com/perl6/doc/issues/1744#issuecomment-360565196 Cro module
- ↑ https://perl6advent.wordpress.com/2011/12/14/meta-programming-what-why-and-how/
- ↑ https://perl6advent.wordpress.com/2009/12/18/day-18-roles/ Parametrized Roles
- ↑ https://docs.perl6.org/language/mop
- ↑ https://docs.perl6.org/language/classtut Classes and Roles
- ↑ PHP Manual, Chapter 17. Functions
- ↑ PHP Manual, Chapter 19. Classes and Objects (PHP 5)
- ↑ PHP Manual, Anonymous functions
- ↑ "Parallel Processing and Multiprocessing in Python". wiki.python.org. Retrieved 21 October 2016.
- ↑ "threading — Higher-level threading interface". docs.python.org. Retrieved 21 October 2016.
- ↑ "python-constraint". pypi.python.org. Retrieved 21 October 2016.
- ↑ "DistributedProgramming". wiki.python.org. Retrieved 21 October 2016.
- ↑ "Chapter 9. Metaprogramming". chimera.labs.oreilly.com. Retrieved 22 October 2016.
- ↑ "Metaprogramming". readthedocs.io. Retrieved 22 October 2016.
- ↑ "PEP 443 -- Single-dispatch generic functions". python.org. Retrieved 22 October 2016.
- ↑ "PEP 484 -- Type Hints". python.org. Retrieved 22 October 2016.
- ↑ "PyDatalog". Retrieved 22 October 2016.
- ↑ "Magrittr: A Forward Pipe Operator for R". cran.r-project.org\accessdate=13 July 2017.
- ↑ "The Rust macros guide". Rust. Retrieved 19 January 2015.
- ↑ "The Rust compiler plugins guide". Rust. Retrieved 19 January 2015.
- ↑ The Rust Reference §6.1.3.1
- ↑ An Overview of the Scala Programming Language
- ↑ Scala Language Specification
- ↑ "Tcl Programming/Introduction". en.wikibooks.org. Retrieved 22 October 2016.
- ↑ "TCLLIB - Tcl Standard Library: snitfaq:". sourceforge.net. Retrieved 22 October 2016.
- ↑ Notes for Programming Language Experts, Wolfram Language Documentation.
- ↑ External Programs, Wolfram Language Documentation.
References
- Jim Coplien, Multiparadigm Design for C++, Addison-Wesley Professional, 1998.
This article is issued from
Wikipedia.
The text is licensed under Creative Commons - Attribution - Sharealike.
Additional terms may apply for the media files.