[plt-scheme] Swindle with-slots bug or doc bug?

From: Will M. Farr (farr at MIT.EDU)
Date: Thu Jan 5 11:22:21 EST 2006

Hello all,

I've been confused about something that seems to me to be a discrepancy 
between the Swindle docs and the behavior of swindle.  Is this really a 
problem, or is my inexperience with CLOS/Swindle getting the better of 
me:

Swindle docs:
(with-slots obj (slot ...) body ...)   [syntax]

   Evaluate the body in an environment where each 'slot' is defined as a
   symbol-macro that accesses the corresponding slot value of 'obj'.
   Each 'slot' is either an identifier 'id' which makes it stand for
   `(slot-ref obj 'id)', or `(id slot)' which makes 'id' stand for
   `(slot-ref obj 'slot)'.

-----

(with-slots b1 ((m1 m) (q1 q))
       (with-slots b2 ((m2 m) (q2 q))
...))  => expand: unbound variable in module in: q

-----

(with-slots b1 ((m1 'm) (q1 'q))
       (with-slots b2 ((m2 'm) (q2 'q))
...)) => OK.

It looks to me like the docs say that swindle adds the appropriate 
quote around the slot name, but that's not the actual behavior.  
Obviously, it's not serious, but I'd like to know if I'm just crazy or 
if it's really a mistake.

Thanks,
Will

P.S.---I'd be happy to file a bug report if it turns out to be a bug; I 
just don't want to clutter up the system if it's my mistake.


Posted on the users mailing list.