Ideas can change the world.
Not every idea can do so literally, however.
Programs can.
Programs are ideas so clear in their intent that they are linked inextricably with meaning; ideas so clearly realizable that they can mechanistically express that meaning in — or on — the world. For millenia, the only word humans imagined for such ideas was magic.
Programs are magic, and programming languages are the medium of magic. A good language delivers that magic into the hands of programmers. It makes it possible for them to write expressive programs—clear, concise, elegant and efficient.
In this course we will study programming languages, and how they enable this kind of expressiveness. We will look at the basic concepts of languages, and how different kinds of language mechanisms can fit together in different ways. The material will be intellectually substantive and challenging. At the same time, it should be practically useful over your career. You will learn to see the similarities and differences among the thousands of languages we use every day. You will learn not to be fazed as new languages come and go. You will also learn how to design and/or choose a new language when that might make a program you want to develop much easier to write.
The course involves programming, thinking, and good fun discovering what languages, programs and computations really are.
Welcome to 311. I hope that you will find the course rewarding.
High-Level Course Learning Goals
A central concept of this course is that a programming language is built in large part from a collection of individual language design choices. We therefore can (and will) explore the space of languages by exploring the axes that define these choices.
Thus, each of the high-level learning goals below is in a sense “parameterized” by the language design choices under consideration. Similarly, you should find that the kinds of tasks we expect you to perform on assignments and (particularly) exams feel similar across the language design choices we study.
What language design choices or features will we study? Definitely:
- Functions: first-order, higher-order, first-class, and recursion
- Static vs. dynamic scoping and closures
- Surface/concrete syntax, abstract syntax trees, core semantics, and desugaring
- State, mutation, and call-by-value vs. call-by-reference
And many more that we may discuss (e.g., continuations and call stacks, probabilistic programming, types, objects, or others)!
Given all that, our parameterizable high-level learning goals are for you to be able to:
- Assess the semantics of a (new or existing) language as a collection of language design decisions and describe the likely impact of some of those decisions on the language and its programmers.
- Indicate through examples how different design choices for programming language features alter the semantics of syntactically identical code (e.g., giving a code snippet that behaves differently under static and dynamic scoping rules and explaining why).
- Justify or criticize a particular design decision for a programming language feature in the context of a design goal for the language as a whole. (For example, (1) Criticize dynamic scope… which, by the way, we won’t attempt to justify. (2) Justify the exposure of continuations in a language intended to combine Prolog-style databases of logical information with user-designed customized search routines that replace Prolog’s built in left-to-right depth-first-search. Note that (2) will only be appropriate in terms where Prolog-style languages are discussed!)
- Read, write, and modify syntax specifications, abstract syntax specifications/datatypes, parsers, interpreters, and (as appropriate) type checkers and pre-processors for various Racket-like languages illustrating key programming language concepts.
- Read, write, and modify arbitrary, Racket and Racket-like programs as test cases and illustrative examples for the various languages we develop (and for the corresponding functionality in Racket itself). (These will be short, since short programs will suffice for tests/examples; twenty lines at the VERY longest.)