Programming Languages (CSC-302 98S)
Outline of Class 1: Introduction
Held: Monday, January 19, 1998
- C.A.R. Hoare, "Hints on Programming Language Design"
- On page of N. Wirth, "On the Design of Programming Languages"
- Please read the two handouts and the first three chapters of Louden
for Wednesday. None of these readings should require in-depth analysis.
- Please fill out the
introductory survey. I realize
that many of you have filled out a similar survey, but I'd appreciate
it if you do it again.
- Starting next Monday at noon, and continuing most of the following weeks
will be the "CS Bag Lunch Film Festival". I strongly encourage all of
you to attend. January 26 and February 2 will be films on Java from
the creators of Java. February 9 we'll have a guest speaker from
industry who has worked for Thinking Machines, the Free Software Foundation
(GNU), the Open Software Foundation, and is currently working at a small
- A few of you have expressed interest in a +2 version of this course.
I'm somewhat over-booked this term, but I'm willing to talk to you
about such a version as long as you're willing to do the +2 as a
primarily self-directed study.
- I believe Mr. Stone will be restarting the exotic programming languages
study group this semester. He is currently out of town, but I'll try
to let you know more about this by Friday.
- Just a reminder that I've set up a large independent study to work on
developing algorithmic multimedia exercises for our introductory courses.
The first meeting is today at 1:00 in the Math/CS seminar room.
- I believe in beginning my courses with a discussion of the topic of
study. In particular, what are we studying,
why do we study that topic, and
why do we study that topic.
- The following are my notes on the topic. I'd prefer if you waited
to read them until we've had some discussion.
- Surprisingly, different people (even different programming language
theorists) seem to have different definitions of "programming
- What is yours?
- Here are some garnered from notes and books. Are they all
the same? What accounts for the differences?
- Hoare (in part): A tool to aid the programmer.
- Louden: A notational system for describing computation
in machine-readable and human-readable form.
- Reade One, rather narrow, view is that a program is a
sequence of instructions for a machine. We hope to show that there is
much to be gained from taking the much broader view that programs
are descriptions of values, properties, methods, problems, and
solutions. The role of the machine is to speed up the manipulation
of these descriptions to provide solutions to particular problems.
A programming language is a convention for writing descriptions
which can be evaluated.
- Rebelsky: A notation for expressing algorithms so that they
may be understood by humans and processed by machines.
- Stansifer. The purpose of language is communication. Human
beings use natural languages to communicate among themselves.
Programming languages are used to communicate with literal-minded
- Different languages provide significantly different perspectives on
how to express algorithms, data structures, and control. They may also
provide different features for developing algorithms. By visiting
these different perspectives, you will find new ways to express your
ideas (and perhaps even find ways to express ideas that were previously
too difficult to express).
- Most of us will need to write programs in the future. Exposure to
a wider variety of paradigms, principles, and languages
- gives you tools and methodologies for choosing which language to
use for a project;
- increases your ability to learn new languages;
- often improves your programming ability in your language of choice.
- Most major software packages end up including some form of programming
language. By studying languages, you will be better able to design your
- There are many different perspectives on how best to study
programming languages. At times, it seems every course (or at
least every text) promotes a different perspective.
- Each perspective has certain advantages and disadvantages.
- Some perspectives are language-based.
- One might cover a new language every week. This provides a
wide introduction to languages and gives some basis for comparison.
At the same time, it makes it difficult to cover languages and
issues in any depth.
- One might cover a new language ever month. This permits greater
understanding of the particular languages covered, but often at
the expense of higher-level understanding.
- Some perspectives are implementation-based.
- One might develop interpreters for a number of languages. This
enhances understanding of many design issues and their advantages
and disadvantages. At the same time, implementation is difficulty
and can detract from learning of more general issues.
- One might develop an interpreter or compiler for a single language
that expresses concepts from multiple paradigms. Again, this
helps illustrate a number of key concepts and allows you to
experiment with variations on a theme, but has the potential
to miss many important issues.
- Some perspectives are semantics-based.
- One might investigate a single form of semantic notation and develop
semantics for a number of languages (or for one large language).
- One might investigate a number of forms of semantic notation and
develop semantics for a small language.
- Some perspectives are concept-based.
- One might study the various paradigms and design possibilities.
This is the most general strategy, but runs the risk of ignoring
more concrete details.
- We will use the last strategy, and will attempt to ground our discussions
in actual languages. We will also draw upon the other strategies at times,
discussing everything from semantics to implementation to usage.
See the handouts in the
- Suppose you are asked to describe a programming language. What
are some of the general attributes you might use in your description?
- Many people emphasize the syntax of the language. That is,
the way in which you express the concepts of the language. More
abstractly, the syntax provides the legal combinations of symbols
permitted by the language.
- Underlying this is a semantics which assigns meaning to
the various utterances.
- However, most language design is guided by an overall model,
paradigm, or philosophy. That is, how does the language view
- Are there other aspects you would add? Are these three appropriate
for describing natural languages?
- Since the concept of "model" may be confusing to some, we will
take a quick look at some of the standard models of programming
languages, possibly grounding our discussion in examples.
- In imperative languages programs
are collections of basic commands (most often assignments and I/O)
where the execution is sequenced by control structures (e.g.,
loops, conditionals, blocks).
- Imperative languages include C, Pascal, Fortan, and Assembly.
- In object-oriented languages
programs consist of a number of objects that
interact with each other.
- Some also associate inheritance and polymorphism with object-oriented
- Object-oriented languages include Simula, Smalltalk-80, Eiffel, and
- In parallel languages programs
are collections of processes (or, sometimes, structured
data) that communicate with each other.
- Parallel languages include C* and Ada.
- In logic languages programs are collections of
statements within a particular logic. Most typically,
that logic is the predicate logic.
- Prolog is the prototypical logic language.
- OBJ and the equational programming language are others.
- In functional languages programs are collections of
function definitions and function applications.
- Some also associate higher-order functions, abstract functions, and
a lack of side-effects with functional languages.
- Functional languages include FP, "pure" Scheme and LISP, ML, and Haskell.
- In declarative languages programs are collections of
declarations. Many functional and logic languages are also
- In scripting languages programs typically work in
conjunction with a larger application or are interpreted or both. These
programs can be of any of the forms given above. (Yes, I'll admit that
I've never understood why people use this term and I've certainly seen