Edit history: 2004-07-20, Version 1 by Bruno Haible
Status: For CLiki consideration
- Problem Description:
- In DEFINE-CONDITION, the syntax where slot-name is "the list of a slot-name" or "the list of slot name/slot form pairs" seem redundant, given :initform. Was it left in by accident?
- Proposal (DEFINE-CONDITION-SLOT-NAME:RESTRICT):
- Change the description of Slot-name to "a slot name (a symbol)."
- Test case:
- (define-condition my-error (error) (((slot) :reader my-error-slot)))
(define-condition foo () ((((slot-name-symbol . "slot form")))))
(define-condition my-error (error) (((slot 77) :reader my-error-slot)))
- The two other forms are redundant and not consistent with DEFCLASS.
- Current practice:
- CMUCL 18e, SBCL 0.8.9.46, and CLISP 2.33 reject such constructs.
- Cost to Implementors:
- Cost to Users:
- None: The redundant forms were not accepted by the implementations anyway,
- Cost of Non-Adoption:
- Redundant spec.
- Consistency between DEFINE-CONDITION and DEFCLASS.
- Bruno Haible supports proposal RESTRICT.
This page is presently Uncategorized: please add appropriate topic markers and remove this text