Principles of Programming Languages - Department of Computer Science ...

David Liu

Principles of Programming Languages

Lecture Notes for CSC324 (Version 2.1)

Department of Computer Science University of Toronto

principles of programming languages 3

Many thanks to Alexander Biggs, Peter Chen, Rohan Das, Ozan Erdem, Itai David Hass, Hengwei Guo, Kasra Kyanzadeh, Jasmin Lantos, Jason Mai, Sina Rezaeizadeh, Ian Stewart-Binks, Ivan Topolcic, Anthony Vandikas, Lisa Zhang, and many anonymous students for their helpful comments and error-spotting in earlier versions of these notes. Dan Zingaro made substantial contributions to this version of the notes.

Contents

Prelude: The Study of Programming Languages 7

Programs and programming languages 7 Models of computation 11 A paradigm shift in you 14 Course overview 15

1 Functional Programming: Theory and Practice 17

The baseline: "universal" built-ins 18 Function expressions 18 Function application 19 Function purity 21 Name bindings 22 Lists and structural recursion 26 Pattern-matching 28 Higher-order functions 35 Programming with abstract syntax trees 42 Undefined programs and evaluation order 44 Lexical closures 50 Summary 56

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download