[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposed syntactic cleanups in defmethod
- To: Common-Lisp-Object-System@SAIL.STANFORD.EDU
- Subject: Re: proposed syntactic cleanups in defmethod
- From: Patrick H Dussud <DUSSUD%Jenner%ti-csl.csnet@RELAY.CS.NET>
- Date: Mon, 24 Aug 87 15:15:44 CDT
- In-reply-to: Msg of Thu, 20 Aug 87 12:29 EDT from "David A. Moon" <Moon@SCRC-STONY-BROOK.ARPA>
I propose that the DEFMETHOD macro be specified to "refer to" (in the
sense of CLtL p.160) each specialized parameter. This means that a
compiler warning will not occur regardless of whether the body of the
method does or does not refer to the parameter, and the declare ignore
in the above examples must be removed. This makes sense intuitively
if one regards the type check of the argument against the parameter
specializer as being part of the method; thus any specialized parameter
is referred to by the type check.
Sounds good.
So I'd like to see the syntax of an individual
parameter-specializer-name changed to use a different word instead of
QUOTE, and to use a form that evaluates to the object, instead of the
object itself. The form is evaluated at the time the method is defined;
it is not evaluated each time the generic function is called.
I think it is a very good idea.
I mildly prefer EQL over MEMBER, but I thought I'd open up both
suggestions for discussion. Each of these suggests an obvious
generalization, EQL to other predicates and MEMBER to multiple
individuals, and the choice might be based on which generalization we
want people to think about, even if we don't propose to implement the
generalization.
I don't like MEMBER because it looks too much like the CLtL type
specifier and lots of people will think that they can discriminate on
multiple individuals. I am neutral on EQL versus another name as Kempf
suggested.
Patrick.