[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proposal #1



Last call for comments on the following, before the technical committee
tries to make a decision on it.  I am in favor of this proposal.  Most
of the comments have been favorable, except for some technical problems
raised by Loosemore (I don't know if she is now satisfied) and some
doubts expressed by Masinter.  A few people favored doing this with
TYPE-OF, but I think that option has been pretty well shot down in
subsequent discussion.

One change from what was discussed earlier is that the exemption from
error signalling now would apply for SAFETY = 0 or 1, not just SAFETY =
0.  This gives implementors the option of turning on some of the less
expensive checks at Safety = 1, and the rest of them at SAFETY > 1.
This flexibility may be useful in some systems.

---------------------------------------------------------------------------
Proposal #1:  Error signalling

This is a proposed change, upward compatible from the user's
point of view:

Create three levels of errors: Class 1 errors must be deteced and
signalled by any legal implementation.  Class 2 errors must normally be
detected and signalled, but implementations may choose to omit the error
testing and signalling in code compiled with an OPTIMIZE SAFETY value of
0 or 1; in this case, the behavior if the error occurs is unpredictable,
and perhaps fatal to the Lisp.  Class 3 errors are considered to be
errors, but it is left to the discretion of the implementor whether and
under what conditions Class 3 errors are detected and signalled.

There will be a usage note indicating that portable code should not
depend for correct operation on Class 2 errors being signalled, since
under some conditions of compilation they will not be.

Note: CLtL has classes corresponding to Class 1 ("signals an error") and
Class 3 ("is an error").  We intend to propose that certain errors,
including wrong number of arguments to a function, array references out
of bounds, and certain wrong-type errors, be moved from Class 3 to Class
2.  However, such proposals will be discussed individually, after an
error system has been adopted.  The decision at this point is whether we
should use the three-level error system as the working assumption in
future discussions.