Hacker News new | ask | show | jobs
by juki 3379 days 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.
1 comments

Yes, thanks. I only wanted to point out similarities to abstract classes, generic slow methods.