[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Method wrapping

Christoph R.

11/27/2003 3:03:00 PM

From: Peter wrote:
...
> Removing hooks on change of a method means all hooks have to
> be added again needlessly in some cases. And if a change is
> incompatible with the hooks, you can remove or redefine them
> yourself once there's an API to do so. And my guess is it
> will be less work to remove hooks manually than to add hooks
> manually because if you're careful most hooks remain valid.
> And besides, on large changes to signatures of methods,
> you'll have a lot of work to adapt the rest of the code anyhow.

This sound all good and well however this does not change the
fact that you CANNOT use "old hook methods'' if the signature
(arity) of the primary method changed - in this case you have
to trash the current hook method stack in one way or the other.

I feel you gave only very weak argument why in this particular
circumstance the removal shouldn't happen automatically.

/Christoph