
Syllabus
Course Information
Handouts
Resources
Lateness Coupon
|
Welcome to Programming Languages
This course studies programming languages from a language
designer's point of view, by examining the fundamental elements in
the design of programming languages.
Even if you are not going to be a programming language designer,
this information is valuable because
- Understanding how a programming language is designed and
how it might be implemented will make you a more effective
programmer.
- Learning a new programming language is much easier if you know
the key issues in its design and can ask the right questions
about it.
- Designing an API, whether it be for tools you build for others
or only for yourself, is an exercise in programming language
design. If your design includes configuration or extension
capabilities, it really is a language design!
- It is great loads of fun!
There are thousands of programming languages, and surveying them
(let alone mastering them) is an impossible task. The good news is
that there is a relatively small number of important programming
language design ideas. We will elucidate some of these ideas, and
use them to understand, evaluate, and compare programming
languages.
We shall explore these central ideas, in the context of three
themes that run through the course:
- Design dimensions. Programming languages can be
analyzed along a number of discrete dimensions. The
dimensions we will use to study programming languages include
choices of first-class values, naming, state, data, control,
types, safety, and memory management.
- Programming Paradigms. Programming languages can embody
many different models of computation. Java is representative of
the object-oriented model, while C is a popular exemplar
of the imperative model. In this course, we will study
four programming paradigms: function-oriented, imperative,
object-oriented, and logic-oriented programming. We
will read and write programs in all of these paradigms, but most
of our focus will be on the function-oriented paradigm.
- Interpreters and Translators. One of the best ways to
understand the design space of programming languages is to study
the implementation of simple languages. There are two fundamental
approaches to programming language implementation:
- interpreting one programming language (the source
language) on top of another (the implementation
language); and
- translating a program in one programming language (the
source language) into another programming language
(the target language) via a translation program
written in an implementation language. Reading,
modifying, and building interpreters and translators are key
activities in this course. We will use OCaml, Scheme,
Haskell, Java, and C as the implementation languages for
various ``mini'' source languages.
Interpreters and translators are excellent examples of
meta-programming, in which programs manipulate other
programs. The notion of meta-programming may seem confusing and
somewhat incestuous at first glance, but many computer scientists
consider meta-programming to be the most interesting kind of
programming activity. We will get lots of hands-on experience
with meta-programming this semester.
Author: Mark A. Sheldon
Last modified: 31 Dec 2005
|