In ensure-generic-function-using-class, abcl is making a few sanity checks and issuing errors, and it is correct to do so according to the HyperSpec?. However, since they are done already at such an early stage, some useful MOP idioms are not easily expressible, or at least need to be expressed differently, and I think it would be better to perform the checks at a later stage, for example inside shared-initialize.
The concrete case that I encounter is the :lambda-list initialization parameter. In AspectL and filtered-functions, I need to be able to modify the lambda list internally, by adding one or two extra required parameters. I do this, extremely roughly, as follows:
(defmethod initialize-instance :around ((gf my-generic-function) &rest initargs &key lambda-list)
(apply #'call-next-method gf
:lambda-list (list* extra-parameters… lambda-list)
initargs))
All methods that are added to such generic functions also get the extra parameters padded in during method metaobject initialization. However, due to this, the lambda list that ensure-generic-function-using-class sees is, by definition, not congruent with potentially existing methods, and thus complains about this fact with an error. If the check would only occur later (for example in shared-initialize on standard-generic-function), then the modifications would correctly pass through. At least, that is the case in all the other MOP implementations in which AspectL and filtered-functions work.
(Reported by Pascal Costanza)