From: | Kaz Kylheku <kaz@kylheku.com> |
Newsgroups: | comp.compilers |
Date: | Thu, 27 Mar 2014 05:44:15 +0000 (UTC) |
Organization: | Aioe.org NNTP Server |
References: | 14-03-020 14-03-023 14-03-065 14-03-068 |
Keywords: | history, errors |
Posted-Date: | 27 Mar 2014 14:54:11 EDT |
On 2014-03-27, Rob Warnock <rpw3@rpw3.org> wrote:
> According to Gabriel and Steele in "The Evolution of Lisp"[1],
> Lisp 1.5 [early 1960s] had (ERRSET form), which:
>
> ...evaluates *form* in a context in which errors do not terminate
> the program or enter the debugger. If *form* does not cause an
> error, ERRSET returns a singleton list of the value. If execution
> of *form* does cause an error, the ERRSET form quietly returns NIL.
> ...
Before this, Lisp-2, around 1965 or 1966, already had TRY and EXIT,
which looked like a predecessor to catch, and a close relative of this
ERRSET, while also hinting at unwind-protect also (although, in
contrast, unwind-protect doesn't serve as the ultimate termination
point of a control transfer, but only a "pit stop").
TRY went something like this:
(TRY <var> <protected-statemenet> <cleanup-statement>)
TRY evaluates <protected-statement>. If an (EXIT <val>) does not occur
in that evaluation, then when <protected-statement> terminates, the
TRY terminates and control passes to whatever form is next.
If an (EXIT <val>) operation occurs in <protected-statement>, then
variable <var> is bound to the value <val>, and <cleanup-statement> is
executed in scope of that variable. The exit is thereby intercepted,
and control continues with whatever is next after the TRY.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.