2 HaskellIntro

2 HaskellIntro - cs242 Lisp Algol 60 Algol 68 Pascal ML Modula C C Java Kathleen Fisher Smalltalk Reading Concepts in Programming Languages Revised

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
9/22/10 1 Kathleen Fisher cs242 Reading: “Concepts in Programming Languages” Revised Chapter 5 “Real World Haskell”, Chapter 0 ( http://book.realworldhaskell.org/ ) Algol 60 Algol 68 ML Modula Lisp Many others: Algol 58, Algol W, Scheme, EL1, Mesa (PARC), Modula-2, Oberon, Modula-3, Fortran, Ada, Perl, Python, Ruby, C#, Javascript, F#… Pascal Haskell C C++ Smalltalk Java Dennis Ritchie, Turing Award winner, for writing Unix Statically typed, general purpose language, designed for writing systems code. Computational model re±ects underlying machine. Relationship between arrays and pointers An array is treated as a pointer to ²rst element E1[E2] is equivalent to ptr dereference: *((E1)+(E2)) Pointer arithmetic is not common in other languages Not statically type safe. Ritchie quote “C is quirky, ±awed, and a tremendous success.” ML Statically typed, general-purpose programming language Designed by Turing-Award winner Robin Milner for LCF Theorem Prover Type safe, with formal semantics Compiled language, but intended for interactive use Combination of Lisp and Algol-like features Expression-oriented Higher-order functions Garbage collection Abstract data types Module system Exceptions Used in textbook as example language Haskell Haskell is a programming language that is Similar to ML : general-purpose, strongly typed, higher-order, functional, supports type inference, supports interactive and compiled use Different from ML : lazy evaluation, purely functional core, rapidly evolving type system. Designed by committee in 80’s and 90’s to unify research efforts in lazy languages. Haskell 1.0 in 1990, Haskell ‘98 , Haskell’ ongoing. A History of Haskell: Being Lazy with Class ” HOPL 3 Paul Hudak John Hughes Simon Peyton Jones Phil Wadler Good vehicle for studying language concepts Types and type checking General issues in static and dynamic typing Type inference Parametric polymorphism Ad hoc polymorphism (aka, overloading) Control Lazy vs. eager evaluation Tail recursion and continuations Precise management of effects
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9/22/10 2 Functional programming will make you think differently about programming. Mainstream languages are all about state Functional programming is all about values Ideas will make you a better programmer in whatever language you regularly use.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2011 for the course CS 242 at Stanford.

Page1 / 7

2 HaskellIntro - cs242 Lisp Algol 60 Algol 68 Pascal ML Modula C C Java Kathleen Fisher Smalltalk Reading Concepts in Programming Languages Revised

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online