Hooks (Re: What does Python fix?)

Pedro Rodriguez pedro_rodriguez at club-internet.fr
Wed Jan 23 06:07:46 EST 2002


"Hung Jung Lu" <hungjunglu at yahoo.com> wrote:
 
> I'll look more into Aspect Oriented Programming. However, I often can
> tell the quality of an idea just from the vocabulary chosen in its
> presentation. Many researchers nowadays are more like marketeers. I
> often wish they themselves could spend a little bit more time straighten
> out their own thoughts, instead of making a big fussy mess out there.

I don't know how much hype is given to AOP, but from the documents I read
there are still wondering what are the benefits of such an approach. Even
AspectJ seems to be more an experiment than anything else (the 'J' part of
the name may be the reason why it is still around). Maybe a company can do
some business around the concept, but I don't think it will make it into
Java language (when you think the time it will take (took ?) before
templates/generic programming can make it officialy in Java).

Still, I consider AOP just like design patterns in the way that it may be
used to name and identify a concept. Consider this : 
- I read about aspects but had no idea why I will ever need such a beast
- while cleaning somecode I realized that several methods were build on
  the same pattern butthe pattern was not correct
- now I had to modify all methods to match the new pattern
- I realized then that this pattern could probably be named an 'aspect'

Quoting myself, I had :
        def mx(self, ...):
            self.notify("start")
            ... mx code here ...
            self.notify("end")
        
and I wanted it to look like :
        def mx(self, ...):
            try:
                self.notify("start")
                ... mx code here ...
                self.notify("end")
            except:
                self.notify("error")

Regards,
-- 

Pedro







More information about the Python-list mailing list