3 ms·
The DEFGENERIC line is wrong. It can't have a body like that. It should be something like (defgeneric xplusone (x) (:method (x) (+ 1 x))) Also, gene
by juki 10y ago
The DEFGENERIC line is wrong. It can't have a body like that. It should be something like
(defgeneric xplusone (x)
(:method (x) (+ 1 x)))
Also, generic functions are slower than regular functions (due to dynamic dispatch), so using them for type optimization would be rather counterproductive.
- rurban 10y agoYes, thanks. I only wanted to point out similarities to abstract classes, generic slow methods.