Content deleted Content added
RProgrammer (talk | contribs) Added PureScript; just let me know if references are necessary given its wikipedia page already has them. (Justification: PureScript is very much like Elm which is already on here, but is even more similar to Haskell, having type classes for example) |
m Open access bot: url-access updated in citation with #oabot. |
||
(62 intermediate revisions by 17 users not shown) | |||
Line 1:
{{Short description|none}}
The table shows a '''comparison of functional programming languages''' which compares various features and designs of different [[functional programming]] languages.
Line 5:
{| class="wikitable sortable"
|-
! Name !! [[
|-
| [[Common Lisp]] || {{No}}<ref name=math-cs.gordon.edu>{{cite web|title=LISP Introduction|url=http://www.math-cs.gordon.edu/courses/cps323/LISP/lisp.html|access-date=26 November 2013}}</ref> || {{Partial
|-
| [[Scheme (programming language)|Scheme]] || {{No}}<ref name=caml.inria.fr>{{cite web|title=Similar Functional Languages|url=http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora202.html|access-date=26 November 2013}}</ref> || {{Yes}}<ref>{{cite web|title=(Scheme) 17. Lazy Evaluation|url=http://www.shido.info/lisp/scheme_lazy_e.html|access-date=30 April 2020}}</ref> || style="background:#FC6; text-align:center"|Dynamic<ref name="caml.inria.fr" /> || {{Yes}}<ref>{{cite web|title=Records - Revised<sup>6</sup> Report on the Algorithmic Language Scheme|url=http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib.html|access-date=11 May 2020}}</ref> || {{Partial
|-
| [[Racket (programming language)|Racket]] || {{No}} || {{
|-
| [[Clojure]] || {{No}}<ref>{{cite web|title=Clojure Functional Programing|url=http://clojure.org/functional_programming}}</ref> || {{Yes}}<ref>{{cite web|title=Clojure - lazy|url=http://clojure.org/lazy|access-date=27 November 2013}}</ref> || style="background:#FC6; text-align:center"|Dynamic<ref>{{cite web|title=Exploring clojure: dynamic typing|date=7 December 2012 |url=http://tgoossens.wordpress.com/2012/12/07/dynamically-exploring-clojure/|access-date=26 November 2013}}</ref> || {{Yes}}<ref>{{cite web|last=Engelberg|first=Mark|title=Thoughts On Programming|date=21 April 2009 |url=http://programming-puzzler.blogspot.com/2009/04/adts-in-clojure.html|access-date=26 November 2013}}</ref> || {{Yes}}<ref name="clojure-contrib">{{cite web|title=clojure-contrib, typing example|url=https://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/types/examples.clj?spec=svn596&r=596|access-date=26 November 2013}}</ref> || {{Yes}}<ref name=clojure.org>{{cite web|title=clojure: functional programming overview|url=http://clojure.org/functional_programming|access-date=26 November 2013}}</ref> || {{No}} || {{Yes}}
|-
| [[Standard ML]] || {{No}}<ref name=cl.cam.ac.uk>{{cite web|title=Introduction to Functional Programming|url=http://www.cl.cam.ac.uk/~jrh13/slides/funprog-jrh/l8.pdf|access-date=26 November 2013}}</ref> || {{No}}<ref>{{cite web|title=Lazy and Eager Evaluation|url=http://homepages.inf.ed.ac.uk/dts/fps/lecture-notes/lazy.pdf|access-date=26 November 2013}}</ref><ref>{{cite web|last=Harper, MacQueen, Milner|title=Standard ML|url=http://www.lfcs.inf.ed.ac.uk/reports/86/ECS-LFCS-86-2/ECS-LFCS-86-2.pdf|work=Section 3.6}}</ref> || style="background:#8CF; text-align:center"|Static<ref>[[Wikibooks:Standard ML Programming/Types]]</ref> || {{
|-
| [[
|-
| [[
|-
| [[
|-
| [[
|-
| [[JavaScript]] || {{No}}<ref>[[List of multi-paradigm programming languages#Language overview]]</ref>{{unreliable source?|date=March 2015}} || {{Partial|Extension}}
|-
| [[
|-
| [[Miranda (programming language)|Miranda]] || {{Yes}}<ref name=miranda.org.uk>{{cite web | url=http://miranda.org.uk/ | title=Miranda Official Website}}</ref> || {{Yes2}}Default<ref name="http://www.cs.kent.ac.uk/people/staff/dat/miranda/Overview.html#Lazy">{{cite web | url=http://www.cs.kent.ac.uk/people/staff/dat/miranda/Overview.html#Lazy | title=An Overview of Miranda}}</ref> || style="background:#8CF; text-align:center"|Static<ref name=miranda.org.uk/> || {{Yes}}<ref name="http://www.cs.kent.ac.uk/people/staff/dat/miranda/Overview.html#Abstract">{{cite web | url=http://www.cs.kent.ac.uk/people/staff/dat/miranda/Overview.html#Abstract | title=An Overview of Miranda}}</ref> || {{Yes}}<ref name="miranda.org.uk" /> || {{Yes}} || {{No}} || {{Yes}} || 1986
▲| [[JavaScript]] || {{No}}<ref>[[List of multi-paradigm programming languages#Language overview]]</ref>{{unreliable source?|date=March 2015}} || {{Partial}}, with extension<ref>{{cite web|last=Tao|first=Dan|title=Lazy.js|url=http://danieltao.com/lazy.js/|work=Dan Tao|access-date=26 November 2013}}</ref> || style="background:#FC6; text-align:center"|Dynamic<ref>{{cite web|title=JavaScript Overview|url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/JavaScript_Overview|work=Mozilla Developer Network|publisher=Mozilla Developer Network|access-date=26 November 2013}}</ref> || {{Partial}}, with extension<ref>{{cite web|last=Frank|first=Thomas|title=Add some klass to JavaScript|url=http://www.thomasfrank.se/klass.html|work=thomasfrank.com|access-date=26 November 2013|archive-url=https://web.archive.org/web/20131208100043/http://thomasfrank.se/klass.html|archive-date=8 December 2013|url-status=dead}}</ref> || {{Partial}}, with extension<ref>{{cite web|last=Faubion|first=Nathan|title=ADT|url=https://npmjs.org/package/adt|work=NPM|publisher=Joyent, nodejitsu|access-date=26 November 2013}}</ref> || {{partial}}<ref>[[Immutable object#JavaScript]]</ref><ref>{{cite web|title=Javascript Data structures|url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures|work=Mozilla Developer Network|publisher=Mozilla Developer Network|access-date=26 November 2013}}</ref> || {{No}} || {{Yes}}<ref name=developer.mozilla.org>{{cite web|title=Javascript Closures|url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures|access-date=26 November 2013}}</ref>
|-
| [[SASL (programming language)|SASL]] || {{Yes}}<ref>Turner, D.A. "An Implementation of SASL". University of St. Andrews, Department of Computer Science Technical Report. TR/75/4.</ref> || {{
|-
| [[
|-
| [[Erlang (programming language)|Erlang]] || {{No}} || {{No}}<ref name=erlang.org>{{cite web | url=http://www.erlang.org/doc/reference_manual/expressions.html#id76539| access-date=27 November 2013 | title=Erlang Reference Manual}}</ref> || style="background:#FC6; text-align:center"|Dynamic || {{Yes}}<ref>{{cite web | url=http://www.erlang.org/eeps/eep-0029.html | title=Erlang Programming Language - Abstract Patterns}}</ref> || {{No}} || {{Yes}}<ref name=stackoverflow.com>{{cite web | url=https://stackoverflow.com/questions/2715517/how-do-i-modify-a-record-in-erlang | access-date=15 December 2013 | title=Stack Overflow - How do I modify a record in erlang?}}</ref> || {{Dunno}} || {{Yes}} || 1986
▲| [[SASL (programming language)|SASL]] || {{Yes}}<ref>Turner, D.A. "An Implementation of SASL". University of St. Andrews, Department of Computer Science Technical Report. TR/75/4.</ref> || {{dunno}} || style="background:#FC6; text-align:center"|Dynamic<ref name="From Semantics to Computer Science">{{cite book | url=https://books.google.com/?id=W2baKp7710sC&pg=PA128&lpg=PA128&dq=sasl+dynamic+typing#v=onepage&q=sasl%20dynamic%20typing&f=false | title=Kahn networks at the dawn of functional programming| isbn=9780521518253| last1=Kahn| first1=Gilles| last2=Bertot| first2=Yves| last3=Huet| first3=Gérard| last4=Lévy| first4=Jean-Jacques| last5=Plotkin| first5=Gordon| date=2009-09-24}}</ref> || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}} || {{dunno}}
|-
| [[Elm (programming language)|Elm]] || {{Yes}} || {{No}} || style="background:#8CF; text-align:center"|Static<ref name=elm-lang.org.blog.interactiveProgramming>{{cite web | url=http://elm-lang.org/blog/Interactive-Programming.elm | access-date=29 November 2013 | title=Elm Blog - Interactive Programming | archive-url=https://web.archive.org/web/20131006235603/http://elm-lang.org/blog/Interactive-Programming.elm | archive-date=6 October 2013 | url-status=dead }}</ref> || {{dunno}} || {{Yes}}<ref name=elm-lang.org.learn.syntax>{{cite web | url=http://elm-lang.org/learn/Syntax.elm#algebraic-data-types | access-date=29 November 2013 | title=Elm Syntax - Algebraic Data Types | archive-url=https://web.archive.org/web/20160313052210/http://elm-lang.org/learn/syntax.elm#algebraic-data-types | archive-date=13 March 2016 | url-status=dead }}</ref> || {{Yes}}<ref name=elm-lang.org.blog.interactiveProgramming /> || {{No}} || {{Yes}}
| [[Elixir (programming language)|Elixir]] || {{No}} || {{Partial}}, with the Stream module<ref name="https://hexdocs.pm/elixir/Stream.html">{{cite web | url=https://hexdocs.pm/elixir/Stream.html | title=Stream - Elixir v.1.6.0}}</ref> || style="background:#FC6; text-align:center"|Dynamic || {{Yes}} || {{No}} || {{Yes}} || {{No}} || {{Yes}}▼
|-
| [[
|-
| [[Python (programming language)|Python]] || {{No}}<ref>{{cite web | url=https://docs.python.org/3/howto/functional.html | title=Functional Programming in Python}}</ref> || {{Partial|Simulated with generators}} || style="background:#FC6; text-align:center"|Dynamic<ref>{{cite web | url=https://docs.python.org/3/faq/general.html#what-is-python | title=What is Python?}}</ref> || {{Yes}}<ref>{{cite web | url=http://www.cs.utexas.edu/~byoung/cs313e/slides5-adt.pdf | title=Abstract Data Types and Stacks}}</ref> || {{No}} || {{Partial}}<ref>[[Immutable object#Python]]</ref> || {{Dunno}} || {{Yes}} || 1991
▲| [[Elm (programming language)|Elm]] || {{Yes}} || {{No}} || style="background:#8CF; text-align:center"|Static<ref name=elm-lang.org.blog.interactiveProgramming>{{cite web | url=http://elm-lang.org/blog/Interactive-Programming.elm | access-date=29 November 2013 | title=Elm Blog - Interactive Programming | archive-url=https://web.archive.org/web/20131006235603/http://elm-lang.org/blog/Interactive-Programming.elm | archive-date=6 October 2013 | url-status=dead }}</ref> || {{dunno}} || {{Yes}}<ref name=elm-lang.org.learn.syntax>{{cite web | url=http://elm-lang.org/learn/Syntax.elm#algebraic-data-types | access-date=29 November 2013 | title=Elm Syntax - Algebraic Data Types | archive-url=https://web.archive.org/web/20160313052210/http://elm-lang.org/learn/syntax.elm#algebraic-data-types | archive-date=13 March 2016 | url-status=dead }}</ref> || {{Yes}}<ref name=elm-lang.org.blog.interactiveProgramming /> || {{No}} || {{Yes}}<ref>{{cite web | url=https://csmith111.gitbooks.io/functional-reactive-programming-with-elm/content/section2/ClosuresAndCurrying.html | title=Closures and Currying - Programming with Elm}}</ref>
|-
| [[
|-
| [[Nix (package manager)|Nix]] || {{Yes}} || {{No}} || style="background:#8CF; text-align:center"|Static{{Citation needed|date=January 2025}} || {{No}} || {{Yes}} || {{Yes}} || {{No}} || {{Yes}} || 2003
|-
|[[Wolfram Language]]
|{{No}}
|{{No}}
|style="background:#8CF; text-align:center"|Static
|{{Yes}}
|{{Yes}}
|{{Yes}}
|{{No}}
|{{Yes}}
| 1988
|-
|[[Kotlin (programming language)|Kotlin]]
|{{No}}
|{{Partial
|style="background:#8CF; text-align:center"|Static
|{{Yes}}
Line 58 ⟶ 67:
|{{No}}
|{{Yes}}
| 2011
|-
|[[Swift (programming language)|Swift]]
|{{No}}
|{{No}}
|style="background:#8CF; text-align:center"|Static
|{{Yes}}
|{{Yes}}
|{{Yes}}
|{{No}}
|{{Partial|Swift uses [[Automatic Reference Counting]], which differs from [[tracing garbage collection]] but is designed to provide similar benefits with better performance.}}
| 2014
|-
|[[Julia (programming language)|Julia]]
Line 66 ⟶ 87:
|{{No}}
|{{Partial}}<ref name=julia-typing/>
|{{
|{{Yes}}
| 2012
|-
|[[PureScript]]
Line 78 ⟶ 100:
|{{Yes}}
|{{Yes}}
| 2013
|-
|[[Rust (programming language)|Rust]]
|{{No}}
|{{Partial|Lazy iterators}}<ref>{{cite web | url=https://doc.rust-lang.org/book/ch13-02-iterators.html | title=The Rust Programming Language, Processing a Series of Items with Iterators }}</ref> and external libraries<ref>{{cite web | url=https://crates.io/crates/lazy | title=Rust crate 'lazy'}}</ref>
|style="background:#8CF; text-align:center"|Static<ref>{{cite web |url=https://doc.rust-lang.org/book/ch03-02-data-types.html | title=The Rust Programming Language, Data Types}}</ref>
|{{Yes}}<ref name="rust-traits">{{cite web | url=https://doc.rust-lang.org/book/ch10-02-traits.html | title=The Rust Programming Language, Traits}}</ref>
|{{Yes}}<ref>{{cite web | url=https://doc.rust-lang.org/book/ch06-00-enums.html | title=The Rust Programming Language, Enums}}</ref>
|{{Yes}}<ref>{{cite web | url=https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html | title=The Rust Programming Language, Variables and Mutability}}</ref>
|{{Yes}}, through traits<ref name="rust-traits"/>
|{{No}}
| 2010
|-
|[[Bosque (programming language)|Bosque]]
|{{No}}
|{{No}}
|style="background:#8CF; text-align:center"|Static
|{{Yes}}
|{{Yes}}
|{{Yes}}
|{{Dunno}}
|{{Yes}}
|2019
|-
| [[D (programming language)|D]]
| {{Partial|Optional}}<ref>{{cite web|title=D pure functions|url=https://dlang.org/spec/function.html#pure-functions|access-date=3 February 2024}}</ref><ref>{{cite web|title=D safe functions|url=https://dlang.org/spec/function.html#safe-functions|access-date=3 February 2024}}</ref>
| {{Partial|Optional}}<ref>{{cite web|title=Laziness - Dlang Tour|url=https://tour.dlang.org/tour/en/basics/laziness|access-date=7 April 2020}}</ref>
| style="background:#8CF; text-align:center"|Static<ref>{{cite web|title=Type System|url=https://dlang.org/spec/type.html|access-date=7 April 2020}}</ref>
| {{dunno}}
| {{Yes}}
| {{Yes}}<ref>{{cite web|title=Immutable - Dlang Tour|url=https://tour.dlang.org/tour/en/basics/immutability|access-date=7 April 2020}}</ref>
| {{No}}
| {{Yes}}<ref>{{cite web|title=Garbage Collection|url=https://dlang.org/spec/garbage.html|access-date=7 April 2020}}</ref>
| 2001
|-
▲| [[
|}
|