Re: mop: modify generic function
- From: "Marco Baringer" <mb@xxxxxxx>
- Date: Fri, 19 Aug 2005 11:00:03 +0200
John <MB42gDv0@xxxxxxxxxxxxxx> writes:
> 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.
when the generic-function is part of a public protocol then i use
defgeneric. if we're talking about the only method for a
generic-function, and it's not a function only to get some extra error
checking, then i'd not use defgeneric.
(defgeneric startup (object &key &allow-other-keys)
...)
(defmethod startup ((server server-type1) &key ...))
(defmethod startup ((server server-type2) &key ...)
vs.
(defmethod access-slot-with-dwim ((object object-type))
..)
in the second case access-slot-with-dwim isn't really a 'generic'
function, we don't plan of having other methods and the only
documentation we can think of only makes sense in the context of the
method.
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
.
- 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
- Re: mop: modify generic function
- From: John
- mop: modify generic function
- Prev by Date: Re: Emacs Lisp & Common Lisp
- Next by Date: Re: Very poor Lisp performance
- Previous by thread: Re: mop: modify generic function
- Next by thread: Re: mop: modify generic function
- Index(es):
Relevant Pages
|
|