Re: mop: modify generic function



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
.



Relevant Pages

  • Re: Question about HSRP
    ... What is purpose does a secondary virtual ip address serve? ... If you have multiple logical subnets on the LAN, the router ... needs an address in each subnet. ...
    (comp.dcom.sys.cisco)
  • Re: Question about HSRP
    ... What is purpose does a secondary virtual ip address serve? ... the router has failed to defend its ARP cache ... state changes, last state change 00:30:59 ...
    (comp.dcom.sys.cisco)
  • Re: cross browser problem
    ... > On a site showing how to get better google results, ... > filling the alt tags with your keywords. ... The alt text has a documented purpose, and works rather well for that ... Note that key phrase "to serve as content". ...
    (uk.net.web.authoring)
  • Re: Newsgroup back!
    ... and what purpose they serve. ... there's a lot of junk out there in newsgroups if you want to ... appoint moderators, to vet messages before they become visible, and/or ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Import Word Field data into Excel
    ... field data - they can't solely serve the purpose of formulas and easy ... user entry, can they? ... PDF in Acrobat Reader (I use a Mac and can save from Preview or print ...
    (microsoft.public.word.docmanagement)