libera/#ecl - IRC Chatlog
Search
4:44:20
monash
I'm having no luck with slot-value-using-class. I define (defmethod c2mop:slot-value-using-class ((class c2mop:standard-class) (obj barf) slot) ...) and I can access the value defined therein with an explicit call to (c2mop:slot-value-using-class (class-of $b) $b(find 'my-slot (c2mop:class-slots (find-class 'barf)) :key #'c2mop:slot-definition-name))
5:21:58
jackdaniel
slot access for standard classes can be conformingly optimized, because standard class instances are guaranteed to have standard slots
5:23:39
jackdaniel
there is something about defining methods for system generic functions specialized to standard-class somewhere in the spec
5:40:49
monash
it matches behaviour of all lisps except with lispworks with class-option :optimize-slot-access nil
5:43:00
jackdaniel
yes, the restriction is that "any method defined by the user must be specialized on at least one non-specified class"
5:51:21
jackdaniel
I'd love to look into it now, but I'm short on time; if you ping me after next wednesday we can look into that together
5:55:33
jackdaniel
"Implementations may optimize slot-value by compiling it inline. " [see https://www.lispworks.com/documentation/HyperSpec/Body/f_slt_va.htm], and inline slot-value could simply check whether object is of the standard class