Cleanup Issue SETF-FIND-CLASS

Category
CLARIFICATION
References
FIND-CLASS in 88-002R

Problem Description

Is (SETF (FIND-CLASS 'FOO) NIL) permitted as a way to break the link from a name to a class? I can't find anything in the CLOS spec for or against this.

This is Symbolics issue #27.

Proposal (ALLOW-NIL)

Define (SETF (FIND-CLASS 'FOO) NIL) to cause FOO no longer to name a class. If FOO already does not name a class, the operation has no effect.

This does not affect the class formerly named by FOO, if any, except that if FOO was that class's proper name, the class no longer has a proper name.

Rationale

This is simpler than putting in a new function to break the association between a name and a class. When CMAKUNBOUND was removed from an early draft of 88-002R, it was probably intended to add this SETF of FIND-CLASS feature to replace it, but the document was accidentally not updated.

Current Practice

Symbolics Genera 8.0, TI Explorer release 6.0, and Lucid 4.0.0 Beta-1 implement the proposal. Other CLOS implementations were not surveyed.

Cost to Implementors

Easy.

Cost to Users

None.

Cost of Non-Adoption

There will be no portable way to break the association between a name and a class.

Performance Impact

None.

Benefits

Adds a useful feature that was probably intended to be there all along.

Aesthetics

More complete language.

Discussion

Gregor Kiczales says he supports SETF-FIND-CLASS:ALLOW-NIL.

Edit History