[slime-devel] Slime support for metaclasses...

Pascal Costanza pc at p-cos.net
Tue Jan 31 10:27:32 UTC 2006


I have seen a discussion on slot-boundp / slot-makunbound and their  
MOP counterparts. I have tried to respond, but wasn't subscribed to  
this mailing list yet. This time I should get through...

Most CLOS MOP implementations indeed specialize the third arguments  
in the slot-xxx-using-class generic functions on slot definition  
metaobjects. There are two exceptions (one is well known, the other  
probably not so much):

- LispWorks specializes on slot names. This is probably because the  
switch from slot names to slot definition metaobjects in the slot-xxx- 
using-class functions was a very late change in the CLOS MOP  
specification, and the LispWorks CLOS implementation seems to be  
based on some older version of PCL (?!?).

- Allegro specializes slot-value-using-class and (setf slot-value- 
using-class) on slot definition metaobjects, BUT specializes slot- 
boundp-using-class and slot-makunbound-using-class on slot names!!!  
This is not documented anywhere, so it's probably a source of  
confusion. (I have only accidentally found out about this. I have  
already filed a bug report with Franz.)

I don't know exactly the context of your discussion, but you could  
use the Closer to MOP compatibility layer which fixes the slot-xxx- 
using-class functions for LispWorks and Allegro so that all slot-xxx- 
using-class functions are specialized on slot definition metaobjects.  
However, this may have other drawbacks that I cannot judge from here...


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 slime-devel mailing list