Hello CL Pros,

Lately I have been trying to understand the inner workings of the MOP slot protocol as I go through yet one more reading of the usual CLOS litterature (CLHS, AMOP, OOP The CLOS Perspective).

To that end I put together a little test file (here attached) and ran its code in sbcl, clisp, ccl, acl and lispworks.
I got different results in pretty much each CL implementation on the tracing of calls to slot-value-using-class.

I am puzzled and baffled.

The results I see go like this:

sbcl:  only accessors (foo-a) call s-v-u-c.

clisp:  both accessors and cl:slot-value call s-v-u-c.

ccl:  s-v-u-c is called neither by cl:slot-value nor by accessors.

acl:  both accessors and cl:slot-value call s-v-u-c.

lispworks:  only cl:slot-value calls s-v-u-c.


Only clisp and acl seem to agree.

And the cherry on the cake's icing comes with sbcl when then defmethod on s-v-u-c is moved ahead of the defclass/make-instance sequence.
Then, in sbcl, both accessors and cl::slot-value call s-v-u-c as in clisp and acl.

So my question is: Which one is right?

Thank you for your help.

Jean-Claude Beaudoin