Content deleted Content added
m Changed "it's" to the correct possessive form "its" |
GreenC bot (talk | contribs) Reformat 7 archive links. Wayback Medic 2.5 per WP:URLREQ#iaboterr |
||
Line 8:
Functional programming is sometimes treated as synonymous with [[purely functional programming]], a subset of functional programming which treats all functions as [[Deterministic system|deterministic]] mathematical [[Function (mathematics)|functions]], or [[pure function]]s. When a pure function is called with some given arguments, it will always return the same result, and cannot be affected by any mutable [[State (computer science)|state]] or other [[Side effect (computer science)|side effects]]. This is in contrast with impure [[Procedure (computer science)|procedures]], common in [[imperative programming]], which can have side effects (such as modifying the program's state or taking input from a user). Proponents of purely functional programming claim that by restricting side effects, programs can have fewer [[Software bug|bugs]], be easier to [[Debugging|debug]] and [[Software testing|test]], and be more suited to [[formal verification]].<ref name="hudak1989">{{cite journal |last=Hudak |first=Paul |author-link=Paul Hudak |title=Conception, evolution, and application of functional programming languages |journal=ACM Computing Surveys |volume=21 |issue=3 |pages=359–411 |date=September 1989 |url=http://www.dbnet.ece.ntua.gr/~adamo/languages/books/p359-hudak.pdf |doi=10.1145/72551.72554 |s2cid=207637854 |accessdate=2013-08-10 |archivedate=2016-01-31 |archiveurl=https://web.archive.org/web/20160131083528/http://www.dbnet.ece.ntua.gr/~adamo/languages/books/p359-hudak.pdf |url-status=deviated }}</ref><ref name="hughesWhyFPMatters"/>
Functional programming has its roots in [[academia]], evolving from the [[lambda calculus]], a formal system of computation based only on functions. Functional programming has historically been less popular than imperative programming, but many functional languages are seeing use today in industry and education, including [[Common Lisp]], [[Scheme (programming language)|Scheme]],<ref name="clinger1987"/><ref name="hartheimer1987"/><ref name="kidd2007"/><ref name="cleis2006"/> [[Clojure]], [[Wolfram Language]],<ref name="reference.wolfram.com">{{cite web |title=Wolfram Language Guide: Functional Programming |url=http://reference.wolfram.com/language/guide/FunctionalProgramming.html |year=2015 |access-date=2015-08-24}}</ref><ref name="Amath-CO"/> [[Racket (programming language)|Racket]],<ref name="racket-video-games"/> [[Erlang (programming language)|Erlang]],<ref name="erlang-faq"/><ref name="armstrong2007"/><ref name="larson2009"/> [[Elixir (programming language)|Elixir]],<ref>{{Cite web|title=The Elixir Programming Language|url=https://elixir-lang.org/|access-date=2021-02-14}}</ref> [[OCaml]],<ref name="minksy2008"/><ref name="leroy2007"/> [[Haskell]],<ref name="haskell-industry"/><ref name="hudak2007"/> and [[F Sharp (programming language)|F#]].<ref name="quantFSharp">{{cite conference |last=Mansell |first=Howard |title=Quantitative Finance in F# |url=http://cufp.galois.com/2008/abstracts.html#MansellHoward |year=2008 |conference=CUFP 2008 |access-date=2009-08-29 |accessdate=2009-08-29 |archivedate=2015-07-08 |archiveurl=https://web.archive.org/web/20150708125937/http://cufp.galois.com/2008/abstracts.html#MansellHoward |url-status=deviated }}</ref><ref name="businessAppsFSharp">{{cite conference |last=Peake |first=Alex |title=The First Substantial Line of Business Application in F# |url=http://cufp.galois.com/2009/abstracts.html#AlexPeakeAdamGranicz |year=2009 |conference=CUFP 2009 |access-date=2009-08-29 |archive-url=https://web.archive.org/web/20091017070140/http://cufp.galois.com/2009/abstracts.html#AlexPeakeAdamGranicz |archive-date=2009-10-17 |url-status=
== History ==
Line 89:
== Concepts ==
A number of concepts<ref>Sean Tull - Monoidal Categories for Formal Concept Analysis.</ref> and paradigms are specific to functional programming, and generally foreign to [[imperative programming]] (including [[object-oriented programming]]). However, programming languages often cater to several programming paradigms, so programmers using "mostly imperative" languages may have utilized some of these concepts.<ref>{{cite web |url=http://byte.com/art/9408/sec11/art1.htm |archive-url=https://web.archive.org/web/20060827094123/http://byte.com/art/9408/sec11/art1.htm |archive-date=2006-08-27 |title=Functional Programming Comes of Age |first=Dick |last=Pountain |work=[[Byte (magazine)|Byte]] (August 1994) |access-date=August 31, 2006
=== First-class and higher-order functions ===
Line 325:
=== Industry ===
Functional programming has been employed in a wide range of industrial applications. For example, [[Erlang (programming language)|Erlang]], which was developed by the [[Sweden|Swedish]] company [[Ericsson]] in the late 1980s, was originally used to implement [[Fault tolerance|fault-tolerant]] [[telecommunication]]s systems,<ref name="armstrong2007"/> but has since become popular for building a range of applications at companies such as [[Nortel]], [[Facebook]], [[Électricité de France]] and [[WhatsApp]].<ref name="erlang-faq"/><ref name="larson2009"/><ref>{{cite conference |last=Piro |first=Christopher |title=Functional Programming at Facebook |url=http://cufp.galois.com/2009/abstracts.html#ChristopherPiroEugeneLetuchy |year=2009 |conference=CUFP 2009 |access-date=2009-08-29 |archive-url=https://web.archive.org/web/20091017070140/http://cufp.galois.com/2009/abstracts.html#ChristopherPiroEugeneLetuchy |archive-date=2009-10-17 |url-status=
Other functional programming languages that have seen use in industry include [[Scala (programming language)|Scala]],<ref>{{cite conference |last=Momtahan |first=Lee |title=Scala at EDF Trading: Implementing a Domain-Specific Language for Derivative Pricing with Scala |url=http://cufp.galois.com/2009/abstracts.html#LeeMomtahan |year=2009 |conference=CUFP 2009 |access-date=2009-08-29 |archive-url=https://web.archive.org/web/20091017070140/http://cufp.galois.com/2009/abstracts.html#LeeMomtahan |archive-date=2009-10-17 |url-status=
Functional "platforms" have been popular in finance for risk analytics (particularly with large investment banks). Risk factors are coded as functions that form interdependent graphs (categories) to measure correlations in market shifts, similar in manner to [[Gröbner basis]] optimizations but also for regulatory frameworks such as [[Comprehensive Capital Analysis and Review]]. Given the use of OCaml and [[Caml]] variations in finance, these systems are sometimes considered related to a [[categorical abstract machine]]. Functional programming is heavily influenced by [[category theory]].{{Citation needed|date=August 2022}}
Line 375:
<ref name="java-8-javadoc">{{cite web |title=Documentation for package java.util.function since Java 8 (also known as Java 1.8) |url=https://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html |access-date=2021-06-16}}</ref>
<ref name="racket-video-games">{{cite web |title=State-Based Scripting in Uncharted 2 |url=http://www.gameenginebook.com/gdc09-statescripting-uncharted2.pdf |archive-url=https://web.archive.org/web/20121215014637/http://www.gameenginebook.com/gdc09-statescripting-uncharted2.pdf |archive-date=2012-12-15 |access-date=2011-08-08
<ref name="hudak2007">{{cite conference |last1=Hudak |first1=Paul |last2=Hughes |first2=J. |last3=Jones |first3=S. P. |last4=Wadler |first4=P. |author-link1=Paul Hudak |title=A history of Haskell: being lazy with class |url=http://dl.acm.org/citation.cfm?doid=1238844.1238856 |conference=Third ACM SIGPLAN Conference on History of Programming Languages |___location=San Diego, California| date=June 2007 |doi=10.1145/1238844.1238856 |access-date=2013-09-26}}</ref>
Line 381:
<ref name="useR">{{cite web |url=http://www.r-project.org/useR-2006/program.html |title=The useR! 2006 conference schedule includes papers on the commercial use of R |publisher=R-project.org |date=2006-06-08 |access-date=2011-06-20}}</ref><ref name="Chambers">{{cite book |last=Chambers |first=John M. |author-link=John Chambers (programmer) |title=Programming with Data: A Guide to the S Language |publisher=Springer Verlag |year=1998 |pages=67–70 |isbn=978-0-387-98503-9}}</ref>
<ref name="Amath-CO">{{cite web |website=Department of Applied Math |publisher=University of Colorado |title=Functional vs. Procedural Programming Language |url=http://amath.colorado.edu/computing/mmm/funcproc.html |archive-url=https://web.archive.org/web/20071113175801/http://amath.colorado.edu/computing/mmm/funcproc.html |archive-date=2007-11-13 |access-date=2006-08-28
<ref name="Novatchev">{{cite web |url=http://fxsl.sourceforge.net/articles/FuncProg/Functional%20Programming.html |first=Dimitre |last=Novatchev |title=The Functional Programming Language XSLT — A proof through examples |access-date=May 27, 2006}}</ref><ref name="Mertz">{{cite web |url=http://gnosis.cx/publish/programming/xml_models_fp.html |first=David |last=Mertz |title=XML Programming Paradigms (part four): Functional Programming approached to XML processing |access-date=May 27, 2006 |work=IBM developerWorks}}</ref>
|