[plt-scheme] Ancestor accessors in Swindle CLOS

From: Kyle Smith (airfoil at bellsouth.net)
Date: Thu Mar 15 23:47:19 EDT 2007


I think I have a solution.  I don't know why I didn't think of this before, 
but better late than never.  I got the idea reading through the thread on Dot-
notation for structure field access.

If I arrange things correctly I think I can manage to get the defclass along 
with all the separate defines for the ancestor accessors in one define-values 
expression.  That eliminates the problem with the accessors being defined at a 
different level than the class, as well as the problem of breaking definition 
context when not at top-level.  Since the ancestor class has previously been 
defined and since the new accessors are merely generics I can simply define 
the new accessors as calls to the ancestor accessors with names that are built 
from the class being newly defined.  There are a lot of details to be worked 
out, but I think the idea is sound, and it resolves all the issues I had if I 
get it to work in practice.

If you can think of any pitfalls to this approach, please, by all means give 
me a shout.  But I'm hoping my thinking is clear on this and it goes smoothly.


airfoil at bellsouth dot com

Posted on the users mailing list.