hitchhiker's guide to functional programming
Post on 20-Jan-2017
257 Views
Preview:
TRANSCRIPT
Hitchhiker's Guide to Functional Programming
Alonzo ChurchResearched decidability of algorithms and invented a
generic model of calculation – the λ-calculus (early 1930s*)
*see https://en.wikipedia.org/wiki/Lambda_calculus
Alan TuringCreated a model of a generic
computer – the Universal Turing machine (ca. 1936*)
*see https://en.wikipedia.org/wiki/Turing_machine
John von Neumann
Created the architecture of modern computers based on the Universal Turing machine (early 1940s*)
*see https://en.wikipedia.org/wiki/Von_Neumann_architecture
And PL features exploded...GOTO, mutation, pointers, null refs, exceptions, floating point numbers, inheritance, interfaces, threads…
See http://blog.ploeh.dk/2015/04/13/less-is-more-language-features/ for a discussion of harmful PL features
John McCarthyCreated Lisp language based on
the λ-calculus and featuring macros (ca. 1958*)
*see http://www-formal.stanford.edu/jmc/history/lisp/lisp.html
Edsger DijkstraMade a case against the
GOTO statement (in 1968*)*see https://en.wikipedia.org/wiki/Edsger_W._Dijkstra
What’s wrong with this code?
int sum = 0;
for (int i = 1; i <= 10; i++) {
if (i % 2 == 0) sum += i * i;}
System.out.println(sum);
● λ-Calculus is a model of computation● Program is data, generic evaluation algorithm
● Turing machine is a model of a computer
● Program is algorithm
Turing machine and λ-calculus are proven equivalent in terms of computability
Summary
Learn More (click on the images)
top related