私は、Common Lisp エラー処理システムに関連して行ってきたいくつかの調査に対処するために、Peter Seibel Practical Common Lispによる優れた本を読んでいます。
本の説明を読み、ネットで情報を掘り下げようとしましたが、STORE-VALUE
and USE-VALUE
restarts の意味と使用法を理解できませんでした。誰かがこれらの機能の目的を説明できますか?
;;; Example of the STORE-VALUE and USE-VALUE restarts
(defun careful-symbol-value (symbol)
(check-type symbol symbol)
(restart-case (if (boundp symbol)
(return-from careful-symbol-value
(symbol-value symbol))
(error 'unbound-variable
:name symbol))
(use-value (value)
:report "Specify a value to use this time."
value)
(store-value (value)
:report "Specify a value to store and use in the future."
(setf (symbol-value symbol) value))))