(if (= (%signum s) (%signum g)) ; or EQL?
(values t t)
(values nil t)))
+
+;; this method is perhaps interesting enough to talk about?
+(defmethod specializer-accepts-generalizer-p ((gf signum-generic-function) (specializer sb-mop:specializer) (thing signum-specializer))
+ (specializer-accepts-generalizer-p gf specializer (class-of (%signum thing))))
+
+
(defmethod specializer-accepts-p ((s signum-specializer) o)
(and (realp o) (= (%signum s) (signum o))))
(defgeneric fact (n)
(:generic-function-class signum-generic-function))
-(defmethod fact ((n (signum 1))) (* n (fact (1- n))))
(defmethod fact ((n (signum 0))) 1)
+(defmethod fact ((n (signum 1))) (* n (fact (1- n))))
(defmethod fact ((n (signum -1)))
(error "factorial of negative number: ~D" n))
#+end_src
variables vs. environment vs. new protocol function
* Related Work
- [ ] Newton/Rhodes
- - [ ] filtered dispatch
- - [ ] ContextL / context-oriented programming
+ - [ ] filtered dispatch -- the point is that our work continues to
+ be useful in cases where there are unbounded numbers of
+ equivalence classes but each given invokation involves a small
+ number of methods.
+ - [ ] ContextL / context-oriented programming -- dispatch occurs on
+ hidden layer argument being an instance of an anonymous class with
+ suitably arranged superclasses -- OK because set of layers is
+ bounded and under programmer control
- [ ] http://soft.vub.ac.be/Publications/2010/vub-tr-soft-10-04.pdf
- [ ] http://soft.vub.ac.be/lambic/files/lambic-ilc09.pdf
- [ ] http://soft.vub.ac.be/Publications/2011/vub-soft-phd-11-03.pdf
- - [ ] Prototypes with Multiple Dispatch http://sauerbraten.org/lee/ecoop.pdf
+ - [ ] Prototypes with Multiple Dispatch
+ http://sauerbraten.org/lee/ecoop.pdf -- extension of Self-style
+ object system to handle multiple equally-privileged "receivers".
+ A good test case for our protocol; handled adequately with
+ generalizer being the tuple of (roles,delegations), with some
+ thought needed for method redefinitions but otherwise working
+ fine.
- [ ] Sheeple
* Conclusions
+** Acknowledgments
+ We thank Lee Salzman, Pascal Costanza, Mikel Evins for their
+ helpful discussions