[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Yet Another Rite Thought: method combination

Christoph R.

11/18/2003 11:02:00 PM

Joey Gibson wrote:
.
>
> ; call the bar method on our instance 'x'
> (bar x)
>
> Yielding the following:
>
> AROUND-BAR-BEFORE
> BEFORE-BAR
> INSIDE-BAR
> AFTER-BAR
> AROUND-BAR-AFTER
>
> Note that in bar :around, the (call-next-method) is doing
> what Ruby2's proposed call to 'super' will do.
>
> Does that help?


Thank you very much ... I actually I did look
this up for myself but did not come acroos a
Reference on the leagility, effect usefull(or
more likely uselessness:-) of using a
call-next-method in a before or after method.

I actually sort of starting getting a clue that
Matz's scheme (were super is disallowed in in pre's
and post's) but ``allowing multiple hook up
points'' is pretty much equivalent in terms of power
to allowing super in pre's and post's but allowing
only one Hookup point. However if the criteria is
ease or consistency (for example the problem of
changing signature in sub and super class) it
seems that Matz scheme is clearly superior.


/Christoph