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 | Simulated with thunks | Dynamic | Yes | Extension | No | ? | Yes | 1984 |
Scheme | No | Yes | Dynamic | Yes | Simulated with thunks | No | No | Yes | 1975 |
Racket | No | Default in Lazy Racket | Dynamic by default, gradual with Typed Racket | Yes | Yes, with Algebraic Racket | Partial | No | Yes | 1995 |
Clojure | No | Yes | Dynamic | Yes | Yes | Yes | No | Yes | 2007 |
Standard ML | No | No | Static | Yes | Yes | Yes | No | Yes | 1983 |
OCaml | No | Yes | Static | Yes | Yes | Yes | Simulated with parametric modules | Yes | 1996 |
F# | No | Yes | Static | Yes | Yes | Yes | No | Yes | 2005 |
Haskell | Yes | Default | Static | Yes | Yes | Yes | Yes | Yes | 1990 |
Scala | No | Yes | Static | Yes | Yes | Yes | Yes | Yes | 2004 |
JavaScript | No | Extension | Dynamic | Extension | Extension | Partial | ? | Yes | 1995 |
Clean | Yes | Yes, with optional strictness annotations | Static with uniqueness/optionally dynamic | Yes | Yes | Yes, except for unique types | Yes | Yes | 1987 |
Miranda | Yes | Default | Static | Yes | Yes | Yes | No | Yes | 1986 |
SASL | Yes | Yes | Dynamic | Yes | Yes | Yes | No | Yes | 1972 |
Elixir | No | Stream module | Dynamic | Yes | No | Yes | ? | Yes | 2012 |
Erlang | No | No | Dynamic | Yes | No | Yes | ? | Yes | 1986 |
Elm | Yes | No | Static | ? | Yes | Yes | No | Yes | 2012 |
Futhark | Yes | No | Static | Yes | Yes | Yes | No | Yes | 2014 |
Python | No | Simulated with generators | Dynamic | Yes | No | Partial | ? | Yes | 1991 |
Idris | Yes | Yes | Static | Yes | Yes | Yes | Yes | 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 | Lazy delegation and Sequence | 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 | Dynamic | Yes | No | Partial | ? | Yes | 2012 |
PureScript | Yes | No | Static | Yes | Yes | Yes | Yes | Yes | 2013 |
Rust | No | Lazy iterators and external libraries | Static | Yes | Yes | Yes | Yes, through traits | No | 2010 |
Bosque | No | No | Static | Yes | Yes | Yes | ? | Yes | 2019 |
D | Optional | Optional | Static | ? | Yes | Yes | No | Yes | 2001 |
Gleam | No | Experimental external libraries | Static | Yes | Yes | Yes | No | Yes | 2019 |
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". GitHub. Retrieved 11 May 2020.
- "Mutable Data Structures" (PDF). Retrieved 28 November 2013.
- ^ "Similar Functional Languages". Retrieved 26 November 2013.
- "(Scheme) 17. Lazy Evaluation". Retrieved 30 April 2020.
- "Records - Revised 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". 7 December 2012. Retrieved 26 November 2013.
- Engelberg, Mark (21 April 2009). "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
- "Mutable and optional data". Retrieved 28 November 2013.
- ^ "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". 15 September 2021.
- "The F# 3.0 Language Specification: 1.1.2 Making Data Simple" (PDF). Retrieved 26 November 2013.
- ^ "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".
- ^ "Scala Overview" (PDF). Retrieved 26 November 2013.
- "Scala by Example" (PDF). Retrieved 26 November 2013.
- ^ "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. 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. Retrieved 26 November 2013.
- "FAQ - Clean".
- ^ 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".
- ^ "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. Cambridge University Press. ISBN 9780521518253.
- "Stream — Elixir v1.17.2". | title=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.
- ^ "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.
- "Type Inference". Retrieved 24 July 2023.
- "Functional Programming in Python".
- "What is Python?".
- "Abstract Data Types and Stacks" (PDF).
- Immutable object#Python
- ^ "Idris Overview". Retrieved 6 December 2013.
- "Kotlin - Delegated Properties".
- "kotlin-stdlib - kotlin.sequences".
- "Noteworthy Differences from Other Languages - The Julia Language".
- ^ "Types - The Julia Language".
- "The Rust Programming Language, Processing a Series of Items with Iterators".
- "Rust crate 'lazy'".
- "The Rust Programming Language, Data Types".
- ^ "The Rust Programming Language, Traits".
- "The Rust Programming Language, Enums".
- "The Rust Programming Language, Variables and Mutability".
- "D pure functions". Retrieved 3 February 2024.
- "D safe functions". Retrieved 3 February 2024.
- "Laziness - Dlang Tour". Retrieved 7 April 2020.
- "Type System". Retrieved 7 April 2020.
- "Immutable - Dlang Tour". Retrieved 7 April 2020.
- "Garbage Collection". Retrieved 7 April 2020.
- "Frequently asked questions – Gleam".