error and exception handling (again) - a LISP anecdote

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Fri, 7 Jan 1994 12:05:25 -0500

I was reading Steele & Gabriel on "The Evolution of Lisp"
( full reference, ftp-site or postscript available on request )
and I would like to quote two paragraphs that parallel some of
the discussion we had a while back on that topic:

"Programmers soon began to use ERRSET and ERR not to trap and
signal errors but for more general control purposes ( dynamic
non-local exits ). Unfortunately, this use of ERRSET also
queitly trapped unexpected errors, making programs harder to
debug. A new pair of primitives, CATCH and THROW, was introduced
into MacLisp so that ERRSET could be reserved for its intended
use of error trapping.
"The lesson of ERRSET and CATCH is important. The designers
of ERRSET and later ERR had in mind a particular situation and
defined a pair of primitives to address that situation. But
because these facilities provided a combination of useful and
powerful capabilities, programmers began to use these facilities
in unintended ways. The the designers had to go back and split
the desired functionality into pieces with alternative
interfaces. This pattern of careful design, unintended use,
and later redesign is common in the evolution of Lisp."

- Steve Majewski

BTW (Guido): I'll try the latest Python Beta today - I've been busy
"putting out fires" since I got back. Except for reading some sci-fi
( Vernor Vinge's "A Fire Upon the Deep" , which had some vague AI
themes in it ) and talking shop with my Physicist neighbor, I managed
to avoid computers entirely for over a week! A new record for me !