[closer-devel] Re: C2MOP and class-prototype

Christophe Rhodes csr21 at cantab.net
Wed Aug 22 06:12:44 UTC 2007


Slava Akhmechet <coffeemug at gmail.com> writes:

> It looks like 'class-prototype' is broken on SBCL 1.0.7 (and C2MOP
> 0.41) for some built-in classes:
>
> (c2mop:class-prototype (find-class 'string)) => 42
> (sb-mop:class-prototype (find-class 'string)) => 42
>
> I didn't find any specializations of this function in C2MOP. What can
> I do to help support it? (It seems pretty easy to specialize on
> offending classes for SBCL but what about tests for all other
> supported implementations?)

Well, this is tricky, I think.  CLASS-PROTOTYPE must return a direct
instance of the class, but some built-in classes are abstract -- there
are no direct instances of STRING in SBCL, as all strings are either
VECTOR-CHARACTER, VECTOR-BASE-CHAR (or VECTOR-NIL :-).

I've debated making class-prototype of an abstract built-in class
signal an error; that might be a better answer.

Cheers,

Christophe




More information about the closer-devel mailing list