Presentation is loading. Please wait.

Presentation is loading. Please wait.

History of Lisp And Functional Programming Languages Scotty Smith.

Similar presentations


Presentation on theme: "History of Lisp And Functional Programming Languages Scotty Smith."— Presentation transcript:

1 History of Lisp And Functional Programming Languages Scotty Smith

2 Overview Lambda CalculusLambda Calculus History of LispHistory of Lisp Key Features of Functional LanguagesKey Features of Functional Languages HaskellHaskell Why no one uses functional languagesWhy no one uses functional languages

3 Lambda Calculus Developed by Alonzo Church in the 1930’sDeveloped by Alonzo Church in the 1930’s Type FreeType Free Deals with recursion, higher-order functions, and curryingDeals with recursion, higher-order functions, and currying λx.x+1 ≡ fun x => x+1

4 The Beginnings of LISP John McCarthy -1956John McCarthy -1956 Dartmouth summer research project on Artificial Intelligence.Dartmouth summer research project on Artificial Intelligence. IBM 704IBM 704

5 FLPL: FORTRAN List Processing Language Implemented at IBM by Herbert Gelernter and Carl GerberichImplemented at IBM by Herbert Gelernter and Carl Gerberich Written as an extension of FORTRANWritten as an extension of FORTRAN

6 Conditional Expressions Developed in 1957 – 1958 at MIT.Developed in 1957 – 1958 at MIT. XIF(M,N1,N2).XIF(M,N1,N2). Developed a true conditional that evaluated only one of its parameters.Developed a true conditional that evaluated only one of its parameters.

7 Innovations Beyond FLPL Recursive functions using conditional expressionsRecursive functions using conditional expressions MaplistMaplist

8 Implementation of LISP Fall of 1958Fall of 1958 MITMIT Started by hand compiling functions written in M-expressionsStarted by hand compiling functions written in M-expressions Prefix notationPrefix notation Contains side effectsContains side effects

9 Turing Machines and LISP The universal LISP functionThe universal LISP function eval[e,a]eval[e,a] e – The LISP expressione – The LISP expression a – a list of assignments of values to variablesa – a list of assignments of values to variables

10 The Interpreter Written by S.R. RussellWritten by S.R. Russell Froze the development of the form of the language.Froze the development of the form of the language.

11 Moving On Lisp 1.5Lisp 1.5 Insertion of elements into lists and deletionInsertion of elements into lists and deletion Lexical scopingLexical scoping FUNARG deviceFUNARG device A compilerA compiler

12 Other contributions of LISP Garbage collectionGarbage collection

13 LISP example (defun factorial (n)(defun factorial (n) (if (<= n 1) 1 (* n (factorial (- n 1)))))

14 Key Features of Functional Languages Higher Order functionsHigher Order functions Curried functionsCurried functions Lazy Evaluation (Non-strict Evaluation)Lazy Evaluation (Non-strict Evaluation) Static typingStatic typing Pattern MatchingPattern Matching GuardsGuards fac 0 = 1fac 0 = 1 fac n|n>0 = n*fac(n-1)

15 Haskell Purely functional languagePurely functional language Attempt at a standard functional languageAttempt at a standard functional language FeaturesFeatures Higher order functionsHigher order functions Lazy evaluationLazy evaluation Static polymorphic typingStatic polymorphic typing User-defined datatypesUser-defined datatypes Pattern matchingPattern matching List comprehensionsList comprehensions New to HaskellNew to Haskell I/O systemI/O system OverloadingOverloading Array comprehensionsArray comprehensions

16 Why no one uses functional languages Portability/AvailabilityPortability/Availability TrainingTraining PopularityPopularity

17 References Hudak, P. 1989. Conception, evolution, and application of functional programming languages. ACM Comput. Surv. 21, 3 (Sep. 1989), 359-411. DOI= http://doi.acm.org/10.1145/72551.72554Hudak, P. 1989. Conception, evolution, and application of functional programming languages. ACM Comput. Surv. 21, 3 (Sep. 1989), 359-411. DOI= http://doi.acm.org/10.1145/72551.72554 McCarthy, J. 1978. History of Lisp. In Preprints of Proceedings of ACM SIGPLAN History of Programming Languages Conference. SIGPLAN Notices, Vol. 13, pp. 217- 223McCarthy, J. 1978. History of Lisp. In Preprints of Proceedings of ACM SIGPLAN History of Programming Languages Conference. SIGPLAN Notices, Vol. 13, pp. 217- 223 Wadler, Phillip. “Functional Programming: Why no one uses functional languages” SIGPLAN Notices 33(8):23-27, August 1998.Wadler, Phillip. “Functional Programming: Why no one uses functional languages” SIGPLAN Notices 33(8):23-27, August 1998.


Download ppt "History of Lisp And Functional Programming Languages Scotty Smith."

Similar presentations


Ads by Google