[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

short form of define-method-combination



    Date: Wed, 19 Aug 87 13:20 EDT
    From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>

    However, I don't understand why you think the method-combination type of
    a generic function needs to be repeated in the defmethod, while the rest
    of the contract of the generic function does not need to be repeated.

You seem to be setting up a hypothetical alternative, but I don't
understand what the alternative is.  We don't have a language for
contracts.

It just seems to me that it's very hard to understand what a method is
doing, and easy to misunderstand it or be confused, if you don't see
what kind of combination is being employed.  When you see a BEFORE
method, you know what that is.  When you see an unqualified method, you
naturally assume that it's a primary method, and that (for example) what
it returns will be the result of the generic function call.  But that's
not true if it's an AND-combined method, or worse yet a PROGN combined
method.

    It seems to me that the command provided by the programming environment
    to remind one of the arguments expected, values returned, and documentation
    of the generic function can also remind one of the method-combination type.
    If you convince me that the method-combination type deserves special
    treatment, then I'll change my proposal to make the qualifier mandatory
    instead of prohibited.

I doubt I can come up with something much more convincing.  It just
seems a lot clearer to me.  (DanG mentioned to me, two days ago, that he
feels the same way.)  In fact, I thought that the reason that qualifiers
for things like AND and OR were first (1980?) introduced was because we
felt they made the code clearer.