From: "T. Onoma" Date: 2003-11-27T16:57:02+09:00 Subject: Re: Method wrapping On Thursday 27 November 2003 08:22 am, Gavin Sinclair wrote: > If you are redefining your own method in development, you know what > you're doing - you're probably just mucking around - and can sort out > the wrappers yourself. Since we are discussing the addition of AOP features to the core language, I don't think factors of what one would do just "mucking around" are good criteria. > If you are redefining someone else's method in production, on your own > head be it. You should be keeping to the same interface of the > original, or else other code is likely to break. Exactly, and to do this requires understanding the interface. And more times than not, if you are REDEFINING a method in this manner, your doing it in totality. Juggling the hooks from before is not condusive. You'll end up remove_method'ing them all anyway. > Wrappers don't depend on the implementation of a method, as you > assert. They depend on the interface. The wrappers should have no > real side-effect anyway, I suspect, except for logging, asserting, ... Of course, I was referreing to the interface of the implementation. Sorry, for not being more specific. As for real side effects. What do you mean? That we should only expect them to be used for certain cases like logging, asserting, ....? AOP has much more potential than this. > It is certainly a curly area, though. If you think of wraps as sort-of class defineable singletons, that is to say, singletons that you define literally in your class definitions. It then makes a whole lot more sense. -t0