The table shows a comparison of functional programming languages which compares various features and designs of different functional programming languages.
Name | Pure | Lazy Evaluation | Typing | Abstract Data Types | Algebraic Data Types | Data is Immutable | Type Classes |
---|---|---|---|---|---|---|---|
Common Lisp | No[1] | Partial, simulated with thunks[2] | Dynamic[3] | Yes[4] | Partial, with extension[5] | No[6] | Not applicable |
Scheme | No[7] | Yes[8] | Dynamic[7] | Yes[9] | Partial, simulated with thunks[10] | No[11] | Not applicable |
Racket | No | Yes, default in Lazy Racket[12] | Dynamic by default, gradual with Typed Racket[13] | Yes[14] | Yes, with Algebraic Racket[15] | Partial[16] | No |
Clojure | No[17] | Yes[18] | Dynamic[19] | Yes[20] | Yes[21] | Yes[22] | Not applicable |
Standard ML | No[23] | No[24][25] | Static[26] | Yes | Yes | Yes[27] | No |
Lazy ML | Yes[28] | Default[28] | Static[29] | Yes | ? | Yes[27] | No |
OCaml | No[30] | Yes[30] | Static[31] | Yes[32] | Yes[33] | Yes[34] | Partial, simulated with parametric modules[35] |
F# | No[36] | Yes[37] | Static[38] | Yes[39] | Yes[40] | Yes[41] | No |
Haskell | Yes[42] | Default[43] | Static[44] | Yes[42] | Yes[45] | Yes[46] | Yes[47] |
Frege | Yes[48] | Default[48] | Static[48] | Yes[48] | Yes[48] | Yes[48] | Yes[48] |
Scala | No[49] | Yes[50] | Static[49] | Yes[51] | Yes[51] | Yes[52] | Yes[53] |
JavaScript | No[54][unreliable source?] | Partial, with extension[55] | Dynamic[56] | Partial, with extension[57] | Partial, with extension[58] | Partial[59][60] | Not applicable |
Clean | Yes[61] | Yes, with optional strictness annotations[62] | Static with uniqueness/optionally dynamic[63] | Yes[62] | Yes[62] | Yes, except for unique types[62] | Yes[62] |
Miranda | Yes[64] | Default[65] | Static[64] | Yes[66] | Yes[64] | ? | ? |
SASL | Yes[67] | ? | Dynamic[68] | ? | ? | ? | ? |
Elixir | No | Partial, with the Stream module[69] | Dynamic | Yes | No | Yes | Not applicable |
Erlang | No | No[70] | Dynamic | Yes[71] | No | Yes[72] | Not applicable |
Elm | Yes | No | Static[73] | ? | Yes[74] | Yes[73] | Not applicable |
Python | No[75] | Partial, simulated with generators | Dynamic[76] | Yes[77] | No | Partial[78] | Not applicable |
Candle | Yes[79] | ? | Dynamic[80] | Partial, only Sequence and Map[81] | ? | Partial[82] | Not applicable |
Idris | Yes[83] | Yes[83] | Static[83] | Yes[83] | Yes[83] | Yes[83] | Yes[83] |
Kotlin | No | Partial, lazy delegation[84] and Sequence[85] | Static | Yes | No | Yes | No |
Julia | No | No[86] | Dynamic[87] | Yes[87] | No | Partial[87] | Not applicable |
PureScript | Yes | No | Static | Yes | Yes | Yes | Yes |
References
- ^ "LISP Introduction". Retrieved 26 November 2013.
- ^ Antoniotti, Marco. "CLAZY: Lazy Calling in Common Lisp". Retrieved 26 November 2013.
- ^ Tratt, Laurence (July 2009). "Dynamically Typed Languages". Advances in Computers. 77: 149–184. doi:10.1016/s0065-2458(09)01205-4. Retrieved 26 November 2013.
- ^ "LISP Tutorial Lecture 3: Data Abstraction".
- ^ "Algebraic data types in Common Lisp". Retrieved 11 May 2020.
- ^ "Mutable Data Structures" (PDF). Retrieved 28 November 2013.
- ^ a b "Similar Functional Languages". Retrieved 26 November 2013.
- ^ "(Scheme) 17. Lazy Evaluation". Retrieved 30 April 2020.
- ^ "Records - Revised6 Report on the Algorithmic Language Scheme". Retrieved 11 May 2020.
- ^ "Algebraic Data Types in Scheme". Retrieved 11 May 2020.
- ^ "Programs with State". Retrieved 29 November 2013.
- ^ Barzilay, Eli. "Lazy Racket". Retrieved 8 February 2020.
- ^ Tobin-Hochstadt, Sam; St-Amour, Vincent; Dobson, Eric; Takikawa, Asumu. "Typed Racket". Retrieved 8 February 2020.
- ^ "The Racket Guide: Programmer-Defined Datatypes". Retrieved 8 February 2020.
- ^ Griffis, Eric. "Algebraic Racket". Retrieved 8 February 2020.
- ^ Buttrick, Matthew. "Beautiful Racket: Data Structures". Retrieved 8 February 2020.
- ^ "Clojure Functional Programing".
- ^ "Clojure - lazy". Retrieved 27 November 2013.
- ^ "Exploring clojure: dynamic typing". Retrieved 26 November 2013.
- ^ Engelberg, Mark. "Thoughts On Programming". Retrieved 26 November 2013.
- ^ "clojure-contrib, typing example". Retrieved 26 November 2013.
- ^ "clojure: functional programming overview". Retrieved 26 November 2013.
- ^ "Introduction to Functional Programming" (PDF). Retrieved 26 November 2013.
- ^ "Lazy and Eager Evaluation" (PDF). Retrieved 26 November 2013.
- ^ Harper, MacQueen, Milner. "Standard ML" (PDF). Section 3.6.
{{cite web}}
: CS1 maint: multiple names: authors list (link) - ^ Wikibooks:Standard ML Programming/Types
- ^ a b "Mutable and optional data". Retrieved 28 November 2013.
- ^ a b "The Interactive Lazy ML System". Retrieved 15 December 2013.
- ^ "A Compiler for Lazy ML". Retrieved 15 December 2013.
- ^ a b "Functional Programming – OCaml". Retrieved 26 November 2013.
- ^ Hickey, Jason. "Introduction to Objective Caml" (PDF). Section 2.4. Cambridge University Press. Archived from the original (PDF) on 2 October 2013. Retrieved 26 November 2013.
- ^ "Type and exception definitions".
- ^ "Learn OCaml - Data Types".
- ^ "Learn OCaml - Imperative Features".
- ^ "Implementing Type-Classes as OCaml Modules". Retrieved 11 May 2020.
- ^ "Learning F#". Retrieved 6 December 2013.
- ^ "Lazy Computations (F#)". Microsoft Developer Network. Retrieved 26 November 2013.
- ^ "About F#". Retrieved 26 November 2013.
- ^ "Structures - F#". Retrieved 11 May 2020.
- ^ "Discriminated Unions".
- ^ "The F# 3.0 Language Specification: 1.1.2 Making Data Simple" (PDF). Retrieved 26 November 2013.
- ^ a b "Haskell Wiki". Retrieved 26 November 2013.
- ^ "Haskell Wiki Lazy Evaluation". Retrieved 26 November 2013.
- ^ "Haskell Typing". HaskellWiki. Retrieved 26 November 2013.
- ^ "Haskell Wiki Abstract Data Type". Retrieved 26 November 2013.
- ^ "Haskell Wiki". Retrieved 27 November 2013.
- ^ "Type Classes and Overloading".
- ^ a b c d e f g "Frege Language Reference" (PDF). Retrieved 26 February 2014.
- ^ a b "Scala Overview" (PDF). Retrieved 26 November 2013.
- ^ "Scala by Example" (PDF). Retrieved 26 November 2013.
- ^ a b "Scala Reference" (PDF). Retrieved 26 November 2013.
- ^ "Mutable and Immutable Collections". Retrieved 26 November 2013.
- ^ "The Neophyte's Guide to Scala Part 12: Type Classes". Retrieved 29 November 2013.
- ^ List of multi-paradigm programming languages#Language overview
- ^ Tao, Dan. "Lazy.js". Dan Tao. Retrieved 26 November 2013.
- ^ "JavaScript Overview". Mozilla Developer Network. Mozilla Developer Network. Retrieved 26 November 2013.
- ^ Frank, Thomas. "Add some klass to JavaScript". thomasfrank.com. Archived from the original on 8 December 2013. Retrieved 26 November 2013.
- ^ Faubion, Nathan. "ADT". NPM. Joyent, nodejitsu. Retrieved 26 November 2013.
- ^ Immutable object#JavaScript
- ^ "Javascript Data structures". Mozilla Developer Network. Mozilla Developer Network. Retrieved 26 November 2013.
- ^ "FAQ - Clean".
- ^ a b c d e Plasmeijer, Rinus; Van Eekelen, Marko; Van Groningen, John (December 2011). Clean Version 2.2 Language Report (PDF). Department of Software Technology, University of Nijmegen. Retrieved 23 May 2018.
- ^ "Clean".
- ^ a b c "Miranda Official Website".
- ^ "An Overview of Miranda".
- ^ "An Overview of Miranda".
- ^ Turner, D.A. "An Implementation of SASL". University of St. Andrews, Department of Computer Science Technical Report. TR/75/4.
- ^ Kahn, Gilles; Bertot, Yves; Huet, Gérard; Lévy, Jean-Jacques; Plotkin, Gordon (2009-09-24). Kahn networks at the dawn of functional programming. ISBN 9780521518253.
- ^ "Stream - Elixir v.1.6.0".
- ^ "Erlang Reference Manual". Retrieved 27 November 2013.
- ^ "Erlang Programming Language - Abstract Patterns".
- ^ "Stack Overflow - How do I modify a record in erlang?". Retrieved 15 December 2013.
- ^ a b "Elm Blog - Interactive Programming". Archived from the original on 6 October 2013. Retrieved 29 November 2013.
- ^ "Elm Syntax - Algebraic Data Types". Archived from the original on 13 March 2016. Retrieved 29 November 2013.
- ^ "Functional Programming in Python".
- ^ "What is Python?".
- ^ "Abstract Data Types and Stacks" (PDF).
- ^ Immutable object#Python
- ^ "Candle Overview". Retrieved 30 November 2013.
- ^ "Candle Overview".
- ^ "Candle Date Model Reference". Retrieved 30 November 2013.
- ^ "Candle's Procedural Design". Retrieved 30 November 2013.
- ^ a b c d e f g "Idris Overview". Retrieved 6 December 2013.
- ^ "Kotlin - Delegated Properties".
- ^ "kotlin-stdlib - kotlin.sequences".
- ^ "Noteworthy Differences from Other Languages - The Julia Language".
- ^ a b c "Types - The Julia Language".