/ Functional Programming

Functional Programming

The functional programming is a programming style characterised by avoidance of shared state, immutability, elimination of side effects[1]. Programming languages that were designed to support this style are called "functional programming languages". If the language enforces the functional style, it is called "pure functional language"[2]. One of the notable languages in this family is, of course, Haskell[3]. The languages supporting functional style are called "impure" and pretty much all general-purpose programming languages that are in active use today are "impure functional languages".

It is hard to say how popular the functional programming is. The share of functional languages in TIOBE index is between 0.5% (only pure languages, like Haskell) and 7% ("traditionally" functional languages, like Lisp, Scala, F#, etc). The similar proportion can be found in job trends [4]. However, the applying modern popular concepts, like SOLID, makes the code look more "functional"[5]. C++ templates[6], C# LINQ[7], JS LoDash[8] and many other techniques and libraries for modern programming languages bring elements of functional programming to codebase. Many best practices like "immutable function parameters", "no global variables (state)", "separation of concerns" either maps to the concepts of functional programming or can be derived from them.

The functional programming is taught in many universities all over the world as part of the computer science disciplines. Stanford[9], Cambridge[10], Moscow[11], Hong-Kong[12] universities have functional programming courses. Big online learning platforms provide the specialised functional programming courses in Scala[13], Erlang[14], OCaml[15], Haskell[16], F#[17] and courses about functional programming in general[18] for free. Paid options are also available[19].

The community aspect of the functional programming is also important. People sharing the passion about the functional programming participating in academic conferences [20] and technology-specific user groups (F#[21], Scala[^22], Haskell[22]) worldwide. There are FP-related meetups in Greater London almost every week[20:1]. The StackOverflow community answered so far 145 thousands questions related to functional programming[23].

The functional programming is definitely an important part of the computer science and programming body of knowledge, something that you learn once, use every day and never have enough :-)


  1. Functional programming, https://en.wikipedia.org/wiki/Functional_programming ↩︎

  2. Functional languages, in List of programming languages, https://en.wikipedia.org/wiki/List_of_programming_languages_by_type#Functional_languages ↩︎

  3. TIOBE Index for May 2017, https://www.tiobe.com/tiobe-index/ ↩︎

  4. java and scala job trends, https://www.indeed.com/jobtrends/q-java-q-scala.html ↩︎

  5. SOLID: the next step is Functional, http://blog.ploeh.dk/2014/03/10/solid-the-next-step-is-functional/ ↩︎

  6. Functional Programming Using C++ Templates, https://accu.org/index.php/journals/1422 ↩︎

  7. Thinking in LINQ. Harnessing the Power of Functional Programming in .NET Applications, http://www.apress.com/gb/book/9781430268451 ↩︎

  8. FP Guide, LoDash, https://github.com/lodash/lodash/wiki/FP-Guide ↩︎

  9. CS95: Functional Programming in Clojure, https://stanfordclojure.com/ ↩︎

  10. Advanced Functional Programming, University of Cambridge, https://www.cl.cam.ac.uk/teaching/1415/L28/ ↩︎

  11. Department of Mathematical Cybernetics, Lomonosov Moscow State University, https://cs.msu.ru/en/departments/mk ↩︎

  12. COMP3258 Functional Programming, http://www.cs.hku.hk/programme/course_info.jsp?infile=2014/comp3258.html ↩︎

  13. Functional Programming Principles in Scala, https://www.coursera.org/learn/progfun1 ↩︎

  14. Functional Programming in Erlang, https://www.futurelearn.com/courses/functional-programming-erlang ↩︎

  15. Introduction to Functional Programming in OCaml, https://www.fun-mooc.fr/courses/parisdiderot/56002S02/session02/about ↩︎

  16. Functional Programming in Haskell: Supercharge Your Coding, https://www.futurelearn.com/courses/functional-programming-haskell ↩︎

  17. Beta: Start Programming With F# Today, https://www.udemy.com/starting-fsharp/ ↩︎

  18. Introduction to Functional Programming, https://www.edx.org/course/introduction-functional-programming-delftx-fp101x-0 ↩︎

  19. Introduction to F#, https://www.pluralsight.com/courses/fsintro ↩︎

  20. Functional programming meetups in Greater London, https://www.meetup.com/find/?keywords=functional+programming&radius=5&userFreeform=Greater+London%2C+United+Kingdom ↩︎ ↩︎

  21. Scala Community, https://www.scala-lang.org/community/ ↩︎

  22. Haskel User groups, https://wiki.haskell.org/User_groups ↩︎

  23. Stackoverflow questions tagged lisp, clojure, erlang, f#, haskell, elm, scala, ocaml or functional-programming, http://stackoverflow.com/questions/tagged/lisp+or+clojure+or+erlang+or+f%23+or+haskell+or+elm+or+scala+or+ocaml+or+functional-programming ↩︎

Alex Netkachov

Alex Netkachov

Alex works at Central London on the next generation of energy trading solutions to traders, brokers and exchanges worldwide.

Read More

Why not to stay updated if the subject is interesting? Join Telegram channel Alex@Net or follow alex_at_net on Twitter. Or just, use the comments form below.