|Request comments on text. firstname.lastname@example.org (1987-07-02)|
|Re: Request comments on text. lm@cottage.WISC.EDU (1987-07-04)|
|Request comments on text. mason@tmsoft.UUCP (1987-07-04)|
|Re: Request comments on text. email@example.com (Steve Vegdahl) (1987-07-06)|
|Re: Request comments on text. ihnp4!sask!reid (1987-07-06)|
|Re: Request comments on text. firstname.lastname@example.org (1987-07-13)|
|Re: Request comments on text. harvard!seismo!utah-cs!shebs (1987-07-15)|
|In-Reply-To:||Your message of 2 Jul 87 19:16:45 GMT. <252@hubcap.UUCP>|
|Date:||06 Jul 87 11:26:47 PDT (Mon)|
|From:||Steve Vegdahl <email@example.com>|
>[I'm not familiar with Trembley and Sorenson, but is there any particular
>reason not to use the dragon book? -John]
In response to John's question, I can think of a number of reasons to not
use the dragon book. Before I list the ones I can think of, let me
preface this with some background.
I have taught both the front- and back-end halves of a two-quarter
graduate compiler course using the dragon book (1986 edition). Non-
technical circumstances made the use of the dragon book nearly manditory,
so I spent virtually no time searching for other options. DESPITE THE FACT
THAT FOLLOWING TEXT DISCUSSES WEAKNESSES OF THE DRAGON BOOK, I THINK THAT
OVERALL, IT IS A GOOD COMPILER TEXT. My compiler experience has been in
compilers for microcode target architectures, and for "advanced" languages
(e.g., Lisp, Smalltalk) for more traditional architectures.
The following describe what I perceive to be weaknesses of the dragon book.
These weaknesses can be largely summed up in the sentence "the dragon book
teaches you how to write a C compiler for a traditional architecture".
* Although I feel that the treatment of the lexical and syntax analysis
if very nice, the discussion of semantic analysis lacks a bit of
overall perspective, being treated in a somewhat ad hoc fashion. The
treatement of back-end issues (e.g., code-generation, optimization)
is even less unified.
* The issue of automatic garbage-collection is all but ignored. It
is actually ignored in two ways. First, little treatment of garbage
collection algorithms is given. (ONE PAGE to discuss both reference-
counting and marking. I believe that they do not even mention copying
garbage-collectors and generation-scavenging, although the latter may
have been too recent for their printing schedules.) Secondly, the
presence of a garbage-collector in an implementation pervades (virtually)
the entire compiler. For example, non-standard data-representations
are typically used; certain optimizations may be disallowed; registers
are typically divided into "rooted" and "non-rooted" classes, with
restrictions on how each is used. The pervasiveness of the garbage-
collection on the entire compiler-writing process is ignored by the
* Little (if any) treatment is given to supporting first-class procedures
* Although type-inference (a la ML) is discussed, the treatment given
is too shallow. Subtleties arise when implementing type-inference
that are not addressed.
* No (little?) discussion of code-reorganization that is now common in
many RISC-style compilers.
* A good programming environment is becoming increasingly recognized
as a fundamental piece of a language implemenation. The book does
not really address this subject. Quite a bit of good work has
been done, for example, in the area of incremental compilation
OK, there's my (partial?) list of "gripes" about the dragon book. Let
me again say that this should not be (mis)construed as a statement that
the dragon book is a lousy book; on the contrary, I think it's a very
informative, well-written book. If a book came out, however, that
addressed some of the above issues, it would be worth considering as
a replacement for the dragon book. I do not know whether any such book
exists. In particular, I am not familiar with Trembley and Sorenson.
(Who publishes their book?)
Computer Research Lab
Return to the
Search the comp.compilers archives again.