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 | Garbage collection | First appeared |
---|---|---|---|---|---|---|---|---|---|
Common Lisp | No[1] | Partial, simulated with thunks[2] | Dynamic[3] | Yes[4] | Partial, with extension[5] | No[6] | Not applicable | Yes | 1984 |
Scheme | No[7] | Yes[8] | Dynamic[7] | Yes[9] | Partial, simulated with thunks[10] | No[11] | Not applicable | Yes | 1975 |
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 | Yes | 1995 |
Clojure | No[17] | Yes[18] | Dynamic[19] | Yes[20] | Yes[21] | Yes[22] | Not applicable | Yes | 2007 |
Standard ML | No[23] | No[24][25] | Static[26] | Yes | Yes | Yes[27] | No | Yes | 1983 |
OCaml | No[28] | Yes[28] | Static[29] | Yes[30] | Yes[31] | Yes[32] | Partial, simulated with parametric modules[33] | Yes | 1996 |
F# | No[34] | Yes[35] | Static[36] | Yes[37] | Yes[38] | Yes[39] | No | Yes | 2005 |
Haskell | Yes[40] | Default[41] | Static[42] | Yes[40] | Yes[43] | Yes[44] | Yes[45] | Yes | 1990 |
Scala | No[46] | Yes[47] | Static[46] | Yes[48] | Yes[48] | Yes[49] | Yes[50] | Yes | 2004 |
JavaScript | No[51][unreliable source?] | Partial, with extension[52] | Dynamic[53] | Partial, with extension[54] | Partial, with extension[55] | Partial[56][57] | Not applicable | Yes | 1995 |
Clean | Yes[58] | Yes, with optional strictness annotations[59] | Static with uniqueness/optionally dynamic[60] | Yes[59] | Yes[59] | Yes, except for unique types[59] | Yes[59] | Yes | 1987 |
Miranda | Yes[61] | Default[62] | Static[61] | Yes[63] | Yes[61] | Yes | No | Yes | 1986 |
SASL | Yes[64] | Yes | Dynamic[65] | Yes | Yes | Yes | No | Yes | 1972 |
Elixir | No | Partial, with the Stream module[66] | Dynamic | Yes | No | Yes | Not applicable | Yes | 2012 |
Erlang | No | No[67] | Dynamic | Yes[68] | No | Yes[69] | Not applicable | Yes | 1986 |
Elm | Yes | No | Static[70] | ? | Yes[71] | Yes[70] | No | Yes | 2012 |
Futhark | Yes | No | Static[72] | Yes | Yes | Yes[70] | No | Yes | 2014 |
Python | No[73] | Partial, simulated with generators | Dynamic[74] | Yes[75] | No | Partial[76] | Not applicable | Yes | 1991 |
Idris | Yes[77] | Yes[77] | Static[77] | Yes[77] | Yes[77] | Yes[77] | Yes[77] | Yes | 2007 |
Nix | Yes | No | Static | No | Yes | Yes | No | Yes | 2003 |
Wolfram Language | No | No | Static | Yes | Yes | Yes | No | Yes | 1988 |
Kotlin | No | Partial, lazy delegation[78] and Sequence[79] | Static | Yes | No | Yes | No | Yes | 2011 |
Swift | No | No | Static | Yes | Yes | Yes | No | Swift uses Automatic Reference Counting, which differs from tracing garbage collection but is designed to provide similar benefits with better performance. | 2014 |
Julia | No | No[80] | Dynamic[81] | Yes[81] | No | Partial[81] | Not applicable | Yes | 2012 |
PureScript | Yes | No | Static | Yes | Yes | Yes | Yes | Yes | 2013 |
Rust | No | Partial, iterators are lazy,[82] external libraries exist[83] | Static[84] | Yes[85] | Yes[86] | Yes[87] | Yes, through traits[85] | No | 2010 |
Bosque | No | No | Static | Yes | Yes | Yes | Unknown | Yes | 2019 |
D | No[88] | Yes, but not default[89] | Static[90] | ? | Yes | Yes[91] | No | Yes[92] | 2001 |
Original source: https://en.wikipedia.org/wiki/Comparison of functional programming languages.
Read more |