Re: mop: modify generic function
- From: John <MB42gDv0@xxxxxxxxxxxxxx>
- Date: Thu, 18 Aug 2005 18:39:58 GMT
On 2005-08-18, Pascal Bourguignon <spam@xxxxxxxxxxxxxxxx> wrote:
> John <IxfSWIna@xxxxxxxxxxxxxx> writes:
> > What purpose does leaving it out serve?
>
> What purpose does having it serve?
Well, according to the hyperspec:
"The effect of the defgeneric macro is as if the following three steps
were performed: first, methods defined by previous defgeneric forms are
removed; second, ensure-generic-function is called; and finally,
methods specified by the current defgeneric form are added to the
generic function."
I can see why you wouldn't always care about those steps though so here
are a few other reasons:
1. Convenient place to place a documentation string for the generic
function. Makes it easier for people other than you to know
what this function is intended to do.
2. Establishes the correct argument list in an unambiguous fashion
enabling the compile to provide better messages.
As far as I can see the only real reason people give for not including it
is to save typing.
At a typing rate of 60wpm (low estimate for people in this group) I fail
to see how much time this really saves. Certainly not enough to sacrifice
clarity.
Just my $.02
.
- Follow-Ups:
- Re: mop: modify generic function
- From: Marco Baringer
- Re: mop: modify generic function
- References:
- mop: modify generic function
- From: Vladimir Zolotykh
- Re: mop: modify generic function
- From: R. Mattes
- Re: mop: modify generic function
- From: John
- Re: mop: modify generic function
- From: Pascal Bourguignon
- mop: modify generic function
- Prev by Date: Re: Very poor Lisp performance
- Next by Date: Re: ANN: wxCL 1.0.0 Alpha, a portable GUI Library
- Previous by thread: Re: mop: modify generic function
- Next by thread: Re: mop: modify generic function
- Index(es):
Relevant Pages
|
|