Issue DEFINE-CONDITION-WRITERS
Issue: DEFINE-CONDITION-WRITERS

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 writeability or otherwise of condition slots is a little unclear. DEFINE-CONDITION's Syntax allows :writer and :accessor, though the Description does not specify them, and the issues seem to imply that conditions were meant to be read-only objects.

Proposal (DEFINE-CONDITION-WRITERS:ALLOW):

Document the :writer and :accessor slot options.

Test case:

(define-condition my-error (error) ((slot :accessor my-error-slot)))

Rationale:

Consistency with DEFCLASS.

Current practice:

SBCL and CLISP support writable condition slots.

Cost to Implementors:

Implement :writer and :accessor option if they haven't already done so.

Cost to Users:

None.

Cost of Non-Adoption:

Unclear spec.

Benefits:

Clarity, and consistency of define-condition and defclass.

Aesthetics:

Discussion:
  • Bruno Haible supports proposal ALLOW.

This page is presently Uncategorized: please add appropriate topic markers and remove this text