From: Marco Baringer
Subject: inverse :around method combination
Date: 
Message-ID: <m2pt2uamhz.fsf@bese.it>
i'd like a method combination which is exactly like :around, but calls
the methods in most-specific _last_ order. i've found it usefull to
allow super classes to define "wrapping" code (setting up state,
setting up restarts, etc.) but since :around and primary methods are
called most-specific last i think need a new method combination.

the questions:

1) is there a better way to go about this?

2) what should i name the method-combination? (i'm sure someone,
   somewhere, has already implemented this)

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
     -Leonard Cohen

From: Kenneth Tilton
Subject: Re: inverse :around method combination
Date: 
Message-ID: <ktilton-158E64.14433103112004@nycmny-nntp-rdr-03-ge0.rdc-nyc.rr.com>
In article <··············@bese.it>, "Marco Baringer" <··@bese.it> 
wrote:

> i'd like a method combination which is exactly like :around, but calls
> the methods in most-specific _last_ order. i've found it usefull to
> allow super classes to define "wrapping" code (setting up state,
> setting up restarts, etc.) but since :around and primary methods are
> called most-specific last i think need a new method combination.
> 
> the questions:
> 
> 1) is there a better way to go about this?
> 

You might want to break out the logic you have in mind for the super's 
around to a separate function rather than pile it all into the same GF.

Or possibly the other arounds could be befores/afters? I recall running 
into this recently, wish i could remember where. A super around had to 
run before logic I had in a subclass around. Then I noticed the subclass 
around happened to work as well as a before method. Coincidence? I do 
not think so. :) I think the standard around precedence problem might 
/only/ arise where arounds were being used inappropriately.


> 2) what should i name the method-combination? (i'm sure someone,
>    somewhere, has already implemented this)

Now /this/ is a fun question. The idea here is that no subclass can 
escape the tyranny of the superclass. How about:

(defmethod render :whose-your-daddy? (widget)
   (setf (fore-color *w*) :red)
   (setf (text widget) "Red Sox")
   ...)

:)

kt
From: Peter Lewerin
Subject: Re: inverse :around method combination
Date: 
Message-ID: <b72f3640.0411040643.e7d6201@posting.google.com>
Kenneth Tilton <·······@nyc.rr.com> wrote 

> (defmethod render :whose-your-daddy? (widget)

I know it's not a predicate, but the ? just seems too Scheme-ish.  I
suggest :whose-your-daddy-p instead.
From: Pascal Bourguignon
Subject: Re: inverse :around method combination
Date: 
Message-ID: <87zn1xveb9.fsf@naiad.informatimago.com>
·············@swipnet.se (Peter Lewerin) writes:

> Kenneth Tilton <·······@nyc.rr.com> wrote 
> 
> > (defmethod render :whose-your-daddy? (widget)
> 
> I know it's not a predicate, but the ? just seems too Scheme-ish.  I
> suggest :whose-your-daddy-p instead.

What about:

    (defmethod render :|Whose your daddy?| (widget)

-- 
__Pascal Bourguignon__
From: Paul Foley
Subject: Re: inverse :around method combination
Date: 
Message-ID: <m2vfcl1a7c.fsf@mycroft.actrix.gen.nz>
On 04 Nov 2004 16:12:10 +0100, Pascal Bourguignon wrote:

> ·············@swipnet.se (Peter Lewerin) writes:
>> Kenneth Tilton <·······@nyc.rr.com> wrote 
>> 
>> > (defmethod render :whose-your-daddy? (widget)
>> 
>> I know it's not a predicate, but the ? just seems too Scheme-ish.  I
>> suggest :whose-your-daddy-p instead.

> What about:

>     (defmethod render :|Whose your daddy?| (widget)

Whose daddy?

It should be |Who's your daddy?|, not |Whose your daddy?|

-- 
I may be mistaken, but the present-day writer, when he takes his pen in
hand to treat a subject which he has studied deeply, has to bear in mind
that the average reader, who has never concerned himself with this subject,
if he reads does so with the view, not of learning something from the
writer, but rather, of pronouncing judgment on him when he is not in
agreement with the commonplaces that the said reader carries in his head.
                                                  -- Jos� Ortega y Gasset
(setq reply-to
  (concatenate 'string "Paul Foley " "<mycroft" '(··@) "actrix.gen.nz>"))
From: Tim Bradshaw
Subject: Re: inverse :around method combination
Date: 
Message-ID: <1099586338.988523.13550@c13g2000cwb.googlegroups.com>
Marco Baringer wrote:
> i'd like a method combination which is exactly like :around, but
calls
> the methods in most-specific _last_ order. i've found it usefull to
> allow super classes to define "wrapping" code (setting up state,
> setting up restarts, etc.) but since :around and primary methods are
> called most-specific last i think need a new method combination.
>
> the questions:
>
> 1) is there a better way to go about this?
>
> 2) what should i name the method-combination? (i'm sure someone,
>    somewhere, has already implemented this)

I'd suggest calling it `wrapping standard' method combination.
Something like http://www.tfeb.org/lisp/hax.html#WRAPPING-STANDARD,
for instance...

--tim