Edit history: 2004-06-16, Version 1 by Christophe Rhodes
Status: For CLiki consideration
- Problem Description:
- In the restrictions on conforming programs, section 18.104.22.168.2, point 18, it is specified that except where specifically allowed, the consequences are undefined if any symbols in the Common Lisp package are bound as a restart name. However, no such permission is given anywhere, even for the standardized restart names; strictly, this means that the user is unable to participate in the protocols defined by those restarts portably, by binding those names where it makes semantic sense.
- Proposal (STANDARDIZED-RESTART-NAMES:ALLOW-BINDING):
- Explicitly allow binding the standardized restart names (abort, continue, muffle-warning, store-value and use-value) as restarts names by conforming code.
- Test case:
(defun read-eval-print-loop (level) (with-simple-restart (abort "Exit command level ~D." level) (loop (with-simple-restart (abort "Return to command level ~D." level) (let ((form (prog2 (fresh-line) (read) (fresh-line)))) (prin1 (eval form)))))))
Also, CLHS ABORT description says "Implementors are encouraged to make sure that there is always a restart named abort around any user code so that user code can call abort at any time and expect something reasonable to happen..."
CLISP installs an ABORT restart.
- Bruno Haible supports proposal ALLOW-BINDING.