Issue DEFINE-CONDITION-DOCUMENTATION
Issue: DEFINE-CONDITION-DOCUMENTATION

Forum: Editorial

References: DEFINE-CONDITION

Category: CLARIFICATION/CHANGE

Edit history: 2004-07-20, Version 1 by Bruno Haible

Status: For CLiki consideration

Problem Description:

The :documentation option applies to the whole type in "Syntax" but not to individual slots in "Arguments and Values" and "Description". DEFCLASS allows it in both places.

Proposal (DEFINE-CONDITION-DOCUMENTATION:LIKE-DEFCLASS):

In DEFINE-CONDITION, add a :documentation slot option.

Test case:

(define-condition my-error (error) ((slot :documentation "my slot")))

Rationale:

Consistency with DEFCLASS.

Current practice:

SBCL and CLISP accept (define-condition my-error (error) ((slot :documentation "my slot"))) without error.

Cost to Implementors:

Small.

Cost to Users:

None.

Cost of Non-Adoption:

Inconsistency of DEFINE-CONDITION and DEFCLASS.

Benefits:

Consistency of DEFINE-CONDITION and DEFCLASS. Ability to set docstrings on condition slots.

Aesthetics:

Discussion:
  • Bruno Haible supports proposal LIKE-DEFCLASS.