232 lines
12 KiB
HTML
232 lines
12 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
||
|
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
||
|
<HEAD>
|
||
|
<TITLE>Preface SECOND EDITION</TITLE>
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
<meta name="description" value=" Preface
|
||
|
SECOND EDITION">
|
||
|
<meta name="keywords" value="clm">
|
||
|
<meta name="resource-type" value="document">
|
||
|
<meta name="distribution" value="global">
|
||
|
<P>
|
||
|
<b>Common Lisp the Language, 2nd Edition</b>
|
||
|
<BR> <HR><A NAME=tex2html1498 HREF="node3.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html1496 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html1490 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html1500 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html1501 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
||
|
<B> Next:</B> <A NAME=tex2html1499 HREF="node3.html"> Acknowledgments
|
||
|
SECOND EDITION</A>
|
||
|
<B>Up:</B> <A NAME=tex2html1497 HREF="clm.html">Common Lisp the Language</A>
|
||
|
<B> Previous:</B> <A NAME=tex2html1491 HREF="node1.html">Contents</A>
|
||
|
<HR> <P>
|
||
|
<H1><A NAME=SECTION00200000000000000000> Preface </A></H1>
|
||
|
SECOND EDITION <br>
|
||
|
<P>
|
||
|
Common Lisp has succeeded. Since publication of the first edition of
|
||
|
this book in 1984, many implementors have used it as a <i>de facto</i>
|
||
|
standard for Lisp implementation. As a result, it is now much easier
|
||
|
to port large Lisp programs from one implementation to another.
|
||
|
Common Lisp has proved to be a useful and stable platform for
|
||
|
rapid prototyping and
|
||
|
systems delivery in artificial intelligence and other areas.
|
||
|
WIth experience gained in using Common Lisp for so many
|
||
|
applications, implementors found no shortage of opportunities for
|
||
|
innovation.
|
||
|
One of the important
|
||
|
characteristics of Lisp is its good support for experimental extension
|
||
|
of the language; while Common Lisp has been stable, it has not stagnated.
|
||
|
<P>
|
||
|
The 1984 definition of Common Lisp was imperfect and incomplete.
|
||
|
In some cases this was inadvertent: some odd boundary situation was
|
||
|
overlooked and its consequences not specified, or different
|
||
|
passages in were conflict, or some property of Lisp was so well-known
|
||
|
and traditionally relied upon that I forgot to write it down.
|
||
|
In other cases the informal committee that was defining
|
||
|
Common Lisp could not settle on a solution, and therefore agreed to leave
|
||
|
some important aspect of the language unspecified rather than
|
||
|
choose a less than satisfactory definition. An example
|
||
|
is error handling; 1984 Common Lisp had plenty of ways to signal
|
||
|
errors but no way for a program to trap or process them.
|
||
|
<P>
|
||
|
Over the next year I collected reports of errors in the book and gaps in the
|
||
|
language. In December 1985, a group of implementors and users met in
|
||
|
Boston to discuss the state of Common Lisp. I prepared
|
||
|
two lists for this meeting, one of errata and clarifications
|
||
|
that I thought would be relatively uncontroversial (boy, was I wrong!)
|
||
|
and one of more substantial changes I thought should be considered and
|
||
|
perhaps voted upon. Others also brought proposals to discuss.
|
||
|
It became clear to everyone that there was now enough interest in Common Lisp,
|
||
|
and dependence on its stability, that a more formal mechanism was needed for
|
||
|
managing changes to the language.
|
||
|
<P>
|
||
|
This realization led to the formation of X3J13, a subcommittee of
|
||
|
ANSI committee X3, to produce a formal American National Standard
|
||
|
for Common Lisp. That process is nearing completion. X3J13 has
|
||
|
completed the bulk of its technical work in rectifying the 1984
|
||
|
definition and codifying extensions to that definition that have
|
||
|
received widespread use and approval. A draft standard is now
|
||
|
being prepared; it will probably be available
|
||
|
in 1990. There will then be a period (required by ANSI) for
|
||
|
public review. X3J13 must then consider the comments it receives
|
||
|
and respond appropriately. If the comments result
|
||
|
in substantial changes to the draft standard, multiple public review
|
||
|
periods may be required before the draft can be approved as an American
|
||
|
National Standard.
|
||
|
<P>
|
||
|
Fortunately, X3J13 has done an outstanding job of documenting its work.
|
||
|
For every change that came to a formal vote, a document was prepared
|
||
|
that described the problem to be solved and one or more solutions.
|
||
|
For each solution there is a detailed proposal for changing the
|
||
|
language; a rationale; test cases that distinguish the proposal
|
||
|
from the status quo or from other proposals for solving that problem;
|
||
|
discussions of current practice, cost to implementors, cost to users,
|
||
|
cost of not adopting the proposal, benefits of adoption,
|
||
|
aesthetic criteria; and any relevant informal discussion that may have
|
||
|
preceded creation of the formal proposal. All of these proposal
|
||
|
documents were made available on-line as well as in paper form.
|
||
|
By my count, by June 1989 some
|
||
|
186 such proposals were approved as language changes.
|
||
|
(This count does not include many proposals that came before the committee
|
||
|
but were rejected.)
|
||
|
<P>
|
||
|
The purpose of this second edition is to bridge the gap between the
|
||
|
first edition and the forthcoming ANSI standard for Common Lisp.
|
||
|
Because of the requirement for formal public review,
|
||
|
it will be some time yet before the ANSI standard is final.
|
||
|
This book in no way resembles the forthcoming standard (which
|
||
|
is being written independently
|
||
|
by Kathy Chapman of Digital Equipment Corporation with assistance
|
||
|
from the X3J13 Drafting Subcommittee).
|
||
|
<P>
|
||
|
I have incorporated into this second edition
|
||
|
a great deal of material based on the votes of X3J13,
|
||
|
in order to give the reader a picture of where the language is heading.
|
||
|
My purpose here is not simply to quote the X3J13 documents verbatim
|
||
|
but to paraphrase them and relate them to the structure of the first
|
||
|
edition. A single vote by X3J13 may be discussed in many parts of this book,
|
||
|
and a single passage of this book may be affected by many of the votes.
|
||
|
<P>
|
||
|
I wish to be very clear: this book is not an official document
|
||
|
of X3J13, though it is based on publicly available material
|
||
|
produced by X3J13. In no way does this book constitute a definitive
|
||
|
description of the forthcoming ANSI standard. The
|
||
|
committee's decisions have been remarkably stable (it has rescinded
|
||
|
earlier decisions only two or three times), and I do not
|
||
|
expect radical changes in direction.
|
||
|
Nevertheless, it is quite probable
|
||
|
that the draft standard will be substantively revised in response to
|
||
|
editorial review or public comment.
|
||
|
I have therefore reported here on the actions of X3J13 not to
|
||
|
inscribe them in stone, but to make clear how the language
|
||
|
of the first edition is likely to change.
|
||
|
I have tried to be careful
|
||
|
in my wording to avoid saying ``the language has been changed''
|
||
|
and to state simply that
|
||
|
``X3J13 voted at such-and-so time to make the following change.''
|
||
|
<P>
|
||
|
Until the day when an official ANSI Common Lisp standard emerges,
|
||
|
it is likely that the 1984 definition of Common Lisp will
|
||
|
continue to be used widely. This book has been designed
|
||
|
to be used as a reference both to the 1984 definition
|
||
|
and to the language as modified by the actions of X3J13.
|
||
|
<P>
|
||
|
It contains the entire text of the first edition
|
||
|
of <i>Common Lisp: The Language</i>, with corrections
|
||
|
and minor editorial changes;
|
||
|
however, more than half of the material in this edition is new.
|
||
|
All new material is
|
||
|
identified by solid lines
|
||
|
in the left margin.
|
||
|
Dotted lines in the left margin indicate material from the first edition
|
||
|
that applies to the 1984 definition but that has been modified
|
||
|
by a vote of X3J13. Modifications to these outmoded
|
||
|
passages are explained by preceding or following text (which will
|
||
|
have a solid line in the margin).
|
||
|
In summary:
|
||
|
<UL><LI> To use the 1984 language definition, read all material that does not
|
||
|
have a solid line in the margin.
|
||
|
<LI> To use the updated language definition, read everything, but
|
||
|
be wary of material with a dotted line in the margin.
|
||
|
</UL>
|
||
|
<P>
|
||
|
At the end of the book is an index of the X3J13 votes, ordered
|
||
|
by the committee's internal code names (included to ease cross-reference
|
||
|
to the X3J13 documents, which may be useful during the public review
|
||
|
periods). References to this list of votes appear as numbers
|
||
|
in angle brackets; thus
|
||
|
``<14>'' refers to the vote on issue number 14, whereas
|
||
|
``[14]'' refers to reference 14 in the bibliography.
|
||
|
<P>
|
||
|
I have kept changes to the wording of the first-edition material to a minimum.
|
||
|
Obvious spelling and typographical errors have been corrected,
|
||
|
and the entire text has been edited to a uniform style of
|
||
|
spelling and punctuation. (Note in particular that the first edition
|
||
|
used the spelling ``signalling'' but this edition,
|
||
|
in deference to the style decision of the X3J13 Drafting
|
||
|
Subcommittee, uses ``signaling.'') A few minor
|
||
|
changes were made to accommodate typographical or layout constraints.
|
||
|
(For example, the word ``also'' has been deleted from the first
|
||
|
sentence of chapter 1, partly to make that paragraph look better
|
||
|
and partly to allow a better page break at the bottom of page 2.)
|
||
|
In a very few cases the first edition contained substantive errors
|
||
|
that I could not in good conscience correct silently; these have
|
||
|
been flagged by paragraphs beginning with the phrase
|
||
|
<i>Notice of correction</i>.
|
||
|
<P>
|
||
|
The chapter and section numbering of this edition matches that
|
||
|
of the first edition, with the exception that a new
|
||
|
section <A HREF="node92.html#STRUCTURETRAVERSALSECTION">7.9</A>
|
||
|
has been interpolated.
|
||
|
Four new chapters (<A HREF="node235.html#LOOP">26</A>-<A HREF="node312.html#CONDITION">29</A>)
|
||
|
describe substantial changes approved by X3J13: an extended
|
||
|
<tt>loop</tt> macro, a pretty printer interface, the Common Lisp
|
||
|
Object System, and the Common Lisp Condition System.
|
||
|
<P>
|
||
|
X3J13, in the course of its work, formed a subcommittee to study
|
||
|
whether additional means of iteration
|
||
|
should be standardized for use in Common Lisp, for a great
|
||
|
deal of existing practice in this area was not included in the
|
||
|
first edition because of lack of agreement in 1984.
|
||
|
The X3J13 Iteration Subcommittee produced reports on three possible facilities.
|
||
|
One (<tt>loop</tt>) was approved for inclusion in the forthcoming draft standard
|
||
|
and is described in chapter <A HREF="node235.html#LOOP">26</A>.
|
||
|
<P>
|
||
|
X3J13 expressed interest in the other two approaches (series and generators),
|
||
|
but the consensus as of January 1989
|
||
|
was that these other approaches were not yet sufficiently mature or
|
||
|
in sufficiently widespread use to warrant inclusion in the draft Common Lisp
|
||
|
standard at that time. However, the subcommittee was directed to continue work
|
||
|
on these approaches and X3J13 is open to the possibility of standardizing
|
||
|
them at a later date.
|
||
|
Please note that I do not wish the prejudge the
|
||
|
question of whether X3J13 will ever choose to make the other two proposals the
|
||
|
subject of standardization. Nevertheless,
|
||
|
I have chosen to include them in the second edition,
|
||
|
in cooperation with Dr. Richard C. Waters,
|
||
|
as appendices <A HREF="node347.html#SERIES">A</A> and <A HREF="node362.html#GENERATORS">B</A>,
|
||
|
in order to make these ideas
|
||
|
available to the Lisp community. In my judgement these proposals
|
||
|
address an area of language design not otherwise covered by Common Lisp
|
||
|
and are likely to have practical value even if they are never
|
||
|
adopted as part of a formal standard.
|
||
|
<P>
|
||
|
Some new material in this book has nothing to do with the work of X3J13.
|
||
|
In many places I have added explanations, clarifications, new examples,
|
||
|
warnings, and tips on writing portable code.
|
||
|
Appendix <A HREF="node367.html#BACKQUOTESIMULATOR">C</A> contains a piece of code
|
||
|
that may help in understanding the backquote syntax.
|
||
|
<P>
|
||
|
This second edition,
|
||
|
unlike the first edition, also includes a few diagrams to pep up the text.
|
||
|
However, there are absolutely no new jokes, and very few outright lies.
|
||
|
<P>
|
||
|
<BR> <HR><A NAME=tex2html1498 HREF="node3.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html1496 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html1490 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html1500 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html1501 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
||
|
<B> Next:</B> <A NAME=tex2html1499 HREF="node3.html"> Acknowledgments
|
||
|
SECOND EDITION</A>
|
||
|
<B>Up:</B> <A NAME=tex2html1497 HREF="clm.html">Common Lisp the Language</A>
|
||
|
<B> Previous:</B> <A NAME=tex2html1491 HREF="node1.html">Contents</A>
|
||
|
<HR> <P>
|
||
|
<HR>
|
||
|
<P><ADDRESS>
|
||
|
AI.Repository@cs.cmu.edu
|
||
|
</ADDRESS>
|
||
|
</BODY>
|