[comp.lang.misc] A comparison of 3 new books on programming languages

dick@cs.vu.nl (Dick Grune) (10/12/89)

This spring I had the opportunity to have three new books on programming
languages available while teaching the course on programming languages
here at the Vrije Universiteit. This resulted in the comparison below. As
it says there, this is strictly my personal though reasonably well-founded
opinion of the books.
					Dick Grune
					Vrije Universiteit
					de Boelelaan 1081
					1081 HV  Amsterdam
					the Netherlands
					dick@cs.vu.nl

# cut here and feed through     tbl | troff -ms
.TL
Comparison of three new books
on principles of programming languages
.AU
Dick Grune
.PP
After a few years of relative quiet on the programming language book market,
three books on principles of programming languages have been published in the
beginning of this year:

%A R. Sethi
%T Programming Languages, Concepts & Constructs
%I Addison-Wesley
%C Reading, Mass.
%D 1989
%P 478
%K 

%A R.W. Sebesta
%T Concepts of Programming Languages
%I Benjamin/Cummings
%C Redwood City, Calif 94065
%D 1989
%P 497
%K 

%A L.B. Wilson
%A R.G. Clark
%T Comparative Programming Languages
%I Addison-Wesley
%C Reading, Mass.
%D 1988
%P 379
%K 
.LP
The following is a personal comparison of these three books and of
%A C. Ghezzi
%A M. Jazayeri
%T Programming Language Concepts, 2/E
%I John Wiley & Sons
%C New York
%D 1987
%P 428
%K 
.LP
The comparison is a by-product of my preparations for the spring course on
principles of programming languages which I teach at the Vrije Universiteit
in Amsterdam, the Netherlands. After preparing for each lecture using G&J, I
read the corresponding parts in each of the new books, making notes.
.PP
The course consists of 13 two-hour lectures and is taught to second-year
students, who have relatively little experience with programming languages:
introduction to programming in Modula-2, followed by short utilitarian
courses on C and
Lisp. Many of the considerations in principles of programming languages would
be lost on them, for sheer lack of experience. I try to remedy this by first
spending 5 lectures on treating Ada extensively, using Barnes' book, just
because Ada has most of the issues in a recognizable way. Then I spend 6
lectures on G&J, followed by 2 lectures on various languages (ALGOL68, Forth,
\&...) This is a lot of material, but the students seem to be able to handle
it. A good book on principles of programming languages should address the
students' inexperiencedness problem, but few do.
.LP
The result of this exercise was a table summarizing my opinions on the
treatment of specific topics, and a loose list of odd notes on each book.
Both follow below.
.SH
General Remarks
.PP
All three books are beautifully done and a pleasure to read and to handle. This
does make a difference, ugly and badly readable print does not motivate.
.PP
Sethi solves the student's experience problem by keeping the scope narrow,
holding the reader firmly by the hand and leading him up a well-paved path,
cushioned by the solid charms of ML. The reader is led to considerable heights,
but misses much along the road.
.LP
Sebesta tries to alleviate the problem by providing 69 pages of introduction,
but I am afraid they may not mean much to a 2-nd year student.
.LP
W&C solve the students' "narrow head" problem by administering doses of
information about various languages as they go.
.LP
G&J do not address the problem at all and expect the student to be fairly
experienced.
.bp
.SH
Topic Comparison
.LP
.TS
box;
ci	|ci	|ci	|ci	|ci
liw(1i)	|lw(1i)	|lw(1i)	|lw(1i)	|lw(1i).
Subject	G&J	Sethi	Sebesta	W&C
_
T{
.na
Parameter passing
T}	T{
.na
Good
T}	T{
.na
Good
T}	T{
.na
No examples. Call-by-name is \fBnot\fR textual substitution.
Treats Jensens' Device, however.
T}	T{
.na
Very good
T}
_
T{
.na
Activation records, static links
T}	T{
.na
Good
T}	T{
.na
Issue played down
T}	T{
.na
Reasonable
T}	T{
.na
Not treated
T}
_
T{
.na
Coroutines
T}	T{
.na
Fairly good
T}	T{
.na
Not treated
T}	T{
.na
Very good
T}	T{
.na
Mentioned in passing
T}
_
T{
.na
Iterators
T}	T{
.na
Good
T}	T{
.na
Functional explanation
T}	T{
.na
Meager
T}	T{
.na
Minimal
T}
_
T{
.na
Exceptions
T}	T{
.na
Good
T}	T{
.na
Minimal
T}	T{
.na
Good
T}	T{
.na
Minimal
T}
_
T{
.na
Abstract data types
T}	T{
.na
Good
T}	T{
.na
Good
T}	T{
.na
Good
T}	T{
.na
Good
T}
_
T{
.na
Guarded commands
T}	T{
.na
Good
T}	T{
.na
Treated in exerc. 9.11
T}	T{
.na
Good
T}	T{
.na
Not treated
T}
_
T{
.na
Concurrency
T}	T{
.na
Good
T}	T{
.na
Very good, smooth!
T}	T{
.na
Good
T}	T{
.na
Short but reasonably complete
T}
_
T{
.na
Functional languages
T}	T{
.na
FP, Lisp, APL
T}	T{
.na
Scheme, ML, polymorphism
T}	T{
.na
Pure Lisp (+ FP, 1 page)
T}	T{
.na
Extensive: Lisp, LOGO, FP, Hope
T}
_
T{
.na
Object-oriented programming
T}	T{
.na
minimal
T}	T{
.na
Good, with emphasis on inheritance
T}	T{
.na
Very good, principles + Smalltalk
T}	T{
.na
As part of abstract data types
T}
_
T{
.na
Logic programming
T}	T{
.na
Principles + Prolog
T}	T{
.na
Very good course on Prolog
T}	T{
.na
Extensive: principles, Horn clauses, Prolog, closed world problem, etc.
T}	T{
.na
Good course on Prolog
T}
_
T{
.na
Real-time languages
T}	T{
.na
Not treated
T}	T{
.na
Not treated
T}	T{
.na
Not treated
T}	T{
.na
Minimal
T}
.TE
.SH
Notes on Sethi
.IP \-
The delicate touch and velvet style of the author matches perfectly the
cuteness of the cover.
.IP \-
Examples are drawn mainly from ML (Harper & Milner's) and from Modula-2.
.IP \-
Pleasant use of light and dark fonts in programs to identify sections of
interest.
.IP \-
Introduction to Modula-2. Introduction to C, with a very good explanation of
why character I/O requires a character of type int.
.IP \-
No systematic treatment of type constructors.
.IP \-
Each (broad) concept is illustrated using (in principle) two languages:
.br
	Assignments: Modula-2, C
.br
	Procedures: C, Modula-2
.br
	Data encapsulation: Modula-2, C++
.br
	Inheritance: Smalltalk, C++
.br
	Functional programming: Scheme, ML
.br
	Logic programming: Prolog
.br
	Concurrency: Ada
.IP \-
Explaining exceptions through an end-of-linked-list example is BAD!
.IP \-
Since ML, the main language of the book is already for a large part a
functional language, functional programming comes naturally.
.IP \-
Separate chapters on:
.br
	Syntax
.br
	Semantic definition
.br
	Lambda calculus
.SH
Notes on Sebesta
.IP \-
First impression: words, words, words.
.IP \-
Requires some sophistication, even in chapter 1.
.IP \-
Very good tables of contents at the beginning of each chapter.
.IP \-
Early treatment of formal semantics.
.IP \-
Systematic approach to each subject.
.IP \-
The terminology is often innovative, with "pass by value" for call-by-value,
"dangling object" for garbage, etc.
.IP \-
Very little on aliasing problems.
.SH
Notes on W&C
.IP \-
The bibliographies are very short but very much to the point.
.IP \-
Much (60 pages) of historical introduction.
.IP \-
Very good description of parameter passing. Comes down heavily on call-by-name.
Original.
.IP \-
Some pieces of program text are in one type font, some in another. Is this
significant? Some pieces are in a very spidery script.
.IP \-
Nothing about power-sets.
.IP \-
Separate chapter on I/O.
.SH
Notes on G&J
.IP \-
Vigorous sometimes harsh style, much detail. Very close to the real world of
programming languages. Selects examples from a broad range of languages.
Requires considerable sophistication from the student.
.IP \-
Separate chapter on Formal semantics.
.IP \-
Over-all use of an operational definition of semantics using a simple
abstracted machine.
.SH
Conclusion
.PP
It is my personal opinion that all four books are quite suitable to form
the basis of a good course in principles of programming languages. Each would
probably require to be supplemented in a different way, but could also be
used as is. G&J and W&C probably require more from the student than Sethi and
Sebesta do.
.LP
For those who want one-liners: G&J supply much information to the quick
student, Sethi is eminently understandable, W&C are broad and thorough, and
Sebesta is a patient explainer. Again, these are My Humble Opinions.
.SH
Disclaimer
.PP
I am not involved in any of these books, nor do I know any of the authors
personally.
.DS
					Dick Grune
					Vrije Universiteit
					de Boelelaan 1081
					1081 HV  Amsterdam
					the Netherlands
					dick@cs.vu.nl
.DE