Computer Laboratory

Course pages 2015–16

Concepts in Programming Languages

Handouts

Handout meta-data and errata

  • Note: the course has been updated for 2015/16. There is additional material -- particularly on monads (Topic X) and variance (Topic VI). Some previous material (e.g. Smalltalk) has been removed -- see the 2014/15 notes if you are interested -- and detailed knowledge of Scala (as opposed to programming concepts) has been downgraded. Note also that not every slide will be lectured, but they are left in place as useful revision background.
  • Errata/Lacunae:
    • Slide 83: the translation to ML is plausible but incorrect because the ML translation has no values of the type UBTree (as there are no non-recursive constructors). The Pascal is fine. The issue is that Pascal allows NULL pointers which are not modelled in the ML 'translation'. Readers might be interested (non-examinable) about Prof Sir Tony Hoare's view that his invention of NULL pointers was a "billion dollar mistake".
    • Slide 93: "The object model in SIMULA was based on procedures activation records, with objects originally described as procedures that return a pointer to their own activation record". The word "objects" should be "classes".
    • Slide 115 (Scripting Languages): perhaps I've dismissed these a little too hastily. Advantages of dynamically typed languages include having, as in LISP, the availability of eval() and the ease of writing a meta-circular evaluator (and interpreter for language L written in language L).
      An interesting question to reflect on is "can eval() be implemented in a statically typed language and, if so, what is its type?".
    • Slides 133-134 (important) Sloppy use of cut-and-paste during slide writing has resulted in these slides declaring variables v as ArrayList (correct) but then using "v[i]" instead of "v.get" and "v.set" for access (sorry). Here are corrected versions of these slides. The exercise above also shows correct use.

Supervision question sets courtesy of Andrew Rice

Notes by topic

  1. Introduction and motivation.
    Supplementary reading material:
  2. The first procedural language: FORTRAN (1954-58).
    Supplementary reading material:
  3. The first declarative language: LISP (1958-62).
    Supplementary reading material:
  4. Block-structured procedural languages: Algol (1958-68) and Pascal (1970).
    Appendix: BCPL (1967) and C (1971-78)
    Supplementary reading material:
  5. Object-oriented languages --- Concepts and origins: SIMULA (1964-67) and Smalltalk (1971-80).
    SML code: Objects in SML!?
    Programming language: Squeak.
    Supplementary reading material:
  6. Types in programming languages: ML (1973-1978).
    Supplementary reading material:
  7. Data abstraction and modularity: SML Modules (1984-97).
    Supplementary reading material:
  8. Languages for concurrency and parallelism
    • A modern language design: Scala (2004-2006).
      Programming language: Scala.
      Supplementary reading material:
    • Miscellaneous concepts.

    Books

    Further reading material