[Openmcl-devel] (SETF FIND-CLASS)
james anderson
james.anderson at setf.de
Wed May 6 06:31:50 PDT 2009
On 2009-05-06, at 13:29 , Gary Byers wrote:
>
> ...
>>
>> CLHS's definition of a proper name:
>>
>> If S is a symbol such that S = (class-name C) and C = (find-class
>> S),
>> then S is the proper name of C.
>>
>> So since CLASS-NAME is redefinable by the user there's no way
>> to circumvent the check against it (except if we were to watch
>> and record any redefinition of it, obviously).
>
> The function (SETF CLASS-NAME) happens to be implemented as a generic
> function in CCL;
which is not just happenstance: http://www.lispworks.com/
documentation/HyperSpec/Body/f_opsetf.htm
> there's one method, specialized on the classes T and CLASS.
>
> The primary method on (SETF CLASS-NAME) uses (SETF CCL::%CLASS-
> PROPER-NAME)
> to update the internal proper-name slot. (It's defined around line
> 1700
> in "ccl/level-1/l1-clos.lisp".) That method also worries about
> whether
> the name's status as a type specifier changes and whether that
> conflicts
> with type specifiers defined with DEFTYPE.
>
> User code can certainly call (SETF CLASS-NAME) to change a class's
> name
> at any time, and doing so affects whether or not the class is properly
> named. As far as I know, the cached proper-name slot is maintained
> correctly.
>
> I'm not sure that I believe that users can portably redefine what
> (SETF CLASS-NAME) does,
such a method is conformant, so long as it is not specialized on a
standardized class.
...
More information about the Openmcl-devel
mailing list