[closer-devel] C2MOP and class-prototype

Pascal Costanza pc at p-cos.net
Wed Aug 22 06:22:23 UTC 2007


On 22 Aug 2007, at 07:44, Slava Akhmechet wrote:

> 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?)

According to the CLOS MOP specification, the behavior of class- 
prototype on instances of built-in-class is undefined. (The entry for  
class-prototype states that it signals an error if the class has not  
been finalized yet, but there is no method specified for finalize- 
inheritance that is applicable for built-in-class.)

Before I can make any changes in Closer to MOP here, I would first  
have to check whether the other Common Lisp implementations could  
live with such changes as well. My gut feeling tells me that there  
may be problems here.

Why don't you just define your own class-prototype function for your  
own uses? Portable programs and third-party libraries cannot rely on  
specified behavior here anyway...


Pascal

-- 
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium







More information about the closer-devel mailing list