GOOPS has GFs which can have a variable number of arguments while still permitting the programmer to specialize on them. This is a quick draft of a CL version that I've done recently and decided to share for fun and profit.
The main issue here is to avoid the fact that methods which agree on parameter specializers and qualifiers as per CLHS 7.6.3 are gonna get overwritten, and we don't want that. GOOPS-like dispatch must mean a maximum of 0 required arguments in defmethod
, which means that we get to specialize on exactly 0 arguments, which means that, trivially, 7.6.3 points 1 and 2 are always going to be true.
Hence, only 7.6.3 point 3 is left for us - and that means qualifiers. I (ab)use those in this example, by using a lax method combination (to still have :before
/:after
/:around
) and passing class names this way. It also means that all method lambda lists are effectively (&rest args)
or something similar, since we have no req