Where did the Functional Languages come from?

Functional Works
6 min readSep 4, 2015

--

The development of modern functional languages kicked off with the Turing Award Lecture by John Backus, the creator of Fortran, titled Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs.

Below is a quick primer to the six main languages that have developed since then. They are listed in alphabetical order, not with any ranking or preference.

Clojure

Clojure is a Lisp-based functional language hosted on the Java Virtual Machine. It was designed for running programs concurrently, while incorporating all the benefits of Lisp, the functional paradigm and the java ecosystem.

It was created by Rick Hickey in 2007, who is currently the CTO of Cognitect. They provide commercial support for Clojure (and Datomic), and are based out of North Carolina, USA.

Clojure is maintained in the clojure/clojure repository.

The main conferences include Clojure/conj, Clojure West and EuroClojure.

Clojure is used by the Mail Online, Thought Works and MixRadio. See other success stories here.

Example from Rosetta Code: 99 Bottles

(defn sing
[start]
(doseq [n (range start 0 -1)]
(printf "%d bottles of beer on the wall,
%d bottles of beer,
Take one down, pass it around,
%d bottles of beer on the wall.\n\n"
n
n
(dec n))))

(sing 99)

Erlang

Erlang refers to the mathematical unit Erlang, and is an abbreviation of Ericsson Language. It was designed to be scalable and fault tolerant, with Erlang applications being famous for a 99.9% uptime. It was originally proprietary but is now open source.

It was created by Joe Armstrong, Robert Virding and Mike Williams in Ericsson’s Computer Science Lab, Stockholm, in 1986. Robert Virding works as principal language expert at Erlang Solutions, a company that provides commercial support for Erlang.

Erlang is maintained in the erlang/otp repository.

The main conferences include the Erlang User Conference and Erlang Factory, both of which are run by Erlang solutions.

Erlang is used by Whatsapp, Couchdb, and is responsible for providing connection for 40% of the world’s mobile internet.

Example from Rosetta Code: 99 Bottles

-module(beersong).
-export([sing/0]).
-define(TEMPLATE_0, "~s of beer on the wall, ~s of beer.~nGo to the store and buy some more, 99
bottles of beer on the wall.~n").
-define(TEMPLATE_N, "~s of beer on the wall, ~s of beer.~nTake one down and pass it around, ~s of
beer on the wall.~n~n").

create_verse(0) -> {0, io_lib:format(?TEMPLATE_0, phrase(0))};
create_verse(Bottle) -> {Bottle, io_lib:format(?TEMPLATE_N, phrase(Bottle))}.

phrase(0) -> ["No more bottles", "no more bottles"];
phrase(1) -> ["1 bottle", "1 bottle", "no more bottles"];
phrase(2) -> ["2 bottles", "2 bottles", "1 bottle"];
phrase(Bottle) -> lists:duplicate(2, integer_to_list(Bottle) ++ " bottles") ++
[integer_to_list(Bottle-1) ++ " bottles"].

bottles() -> lists:reverse(lists:seq(0,99)).

sing() ->
lists:foreach(fun spawn_singer/1, bottles()),
sing_verse(99).

spawn_singer(Bottle) ->
Pid = self(),
spawn(fun() -> Pid ! create_verse(Bottle) end).

sing_verse(Bottle) ->
receive
{_, Verse} when Bottle == 0 ->
io:format(Verse);
{N, Verse} when Bottle == N ->
io:format(Verse),
sing_verse(Bottle-1)
after
3000 ->
io:format("Verse not received - re-starting singer~n"),
spawn_singer(Bottle),
sing_verse(Bottle)
end.

F# (f sharp)

F# is a functional-first language, interoperable with .NET languages and libraries, and designed to speed up production time and simplify data-rich programming.

It was created by Don Syme in 2005, at Microsoft Research (based in Cambridge), where Don Syme is still a principal researcher.

F# is maintained in the fsharp/fsharp repository.

The main conferences include Code Mesh and DDD East Anglia.

F# is used by Jet, Gamesys and Microsoft Research. See other success stories here.

Example from Rosetta Code: 99 Bottles

#light
let rec bottles n =
let (before, after) = match n with
| 1 -> ("bottle", "bottles")
| 2 -> ("bottles", "bottle")
| n -> ("bottles", "bottles")
printfn "%d %s of beer on the wall" n before
printfn "%d %s of beer" n before
printfn "Take one down, pass it around"
printfn "%d %s of beer on the wall\n" (n - 1) after
if n > 1 then
bottles (n - 1)

Haskell

Haskell is named after Haskell Curry, an American mathmatician / logician. A committee came together in Portland, in 1987 (at the progenitor of the International Conference on Functional Programming), to consolidate current functional programming research efforts into a single language. In 1990, this became Haskell, which was designed to be a pure, general-purpose functional language.

The main creators of Haskell are considered to be: Simon Peyton Jones, who is also a Principal Researcher at Microsoft Research; Phillip Wadler, who is a Professor at the University of Edinburgh; Paul Hudak, who was a Professor at Yale University; and John Hughes, who is a Professor at Chalmers University of Technology.

Haskell is maintained in the haskell/haskell-platform repository.

The main conferences include the Haskell Symposium and the ICFP.

Haskell is used by Facebook, investment banks and quantitative trading firms, as well as for small internal projects in various industries. See other success stories here.

Example from Rosetta Code: 99 Bottles

main = mapM_ (putStrLn . beer) [99, 98 .. 0]
beer 1 = "1 bottle of beer on the wall\n1 bottle of beer\nTake one down, pass it around"
beer 0 = "better go to the store and buy some more."
beer v = show v ++ " bottles of beer on the wall\n"
++ show v
++" bottles of beer\nTake one down, pass it around\n"
++ head (lines $ beer $ v-1) ++ "\n"

Ocaml

OCaml was originally called Objective Caml, as it added object orientation to the Caml language. It was designed for safety, intended to be used in systems where errors would be incredibly costly.

It was created by developer teams at Inria, the French Institute for Research in Computer Science and Automation. Three teams have led OCaml development since its release in 1996: Formel, Cristal, and Gallium.

OCaml is maintained in the ocaml/opam repository.

The main conference is OCaml 2015, with the largest meetup being OCaml Users in Paris.

OCaml is used by Facebook and Bloomberg. See other success stories here.

Example from Rosetta Code: 99 Bottles

for n = 99 downto 1 do
Printf.printf "%d bottles of beer on the wall\n" n;
Printf.printf "%d bottles of beer\n" n;
Printf.printf "Take one down, pass it around\n";
Printf.printf "%d bottles of beer on the wall\n\n" (pred n);
done

Scala

Scala was designed for projects that need to scale. Scalable language became Scala. It is interoperable with Java, embraces the Object Orientated paradigm as well as Functional, and has the same benefits as Clojure by being based on the Java Virtual Machine.

It was created by Martin Odersky in 2003, at École Polytechnique Fédérale de Lausanne. Martin Odersky currently serves as Chairman of Typesafe, head-quartered in Switzerland, a company created to provide commercial support for Scala.

Scala is maintained in the scala/scala repository.

The main conferences include Scala Days, Scala by the Bay, and Scala World.

Scala is used by Twitter, AirBnB, Ebay and LinkedIn. See other success stories here.

Example from Rosetta Code: 99 Bottles

99 to 1 by -1 foreach { n =>
println(
f"$n%d bottles of beer on the wall\n" +
f"$n%d bottles of beer\n" +
f"Take one down, pass it around\n" +
f"${n - 1}%d bottles of beer on the wall\n")
}

Thanks for finishing the post. If you liked it, follow us on twitter or sign up for our newsletter to be kept up to date.

If you would like a career in Functional Programming, check out our new job board.

If you have any feedback, thoughts or ideas for future posts contact us @Functionalworks.

--

--

Functional Works

Discover the best Functional programming opportunities through our AI Recruiter www.functionalworks.com