From: Jason Williams Date: 2003-08-28T01:51:46+09:00 Subject: Re: Aspect oriented Everything? In article <8ef9bea6.0308270810.7adfe408@posting.google.com>, Hung Jung Lu wrote: >> def methodThatHasToListenForAnEvent >> listenForEvent(e) do >> # The method stuff goes here >> end >> end [snip] > The question is: are there code spots that are not factored? If you > have ONE single class that has to implement the before, around, or > after methods, sure, nothing wrong with what you have said. But, if > you have > [snip > > You start to ask your self: how come the register() deregister() parts > are not factor out? How can I factor out these parts of code? Okay; module EventListenThing def listenForEvent(e) # ... end end class Thingy include EventListenThing def wotsit listen(e) do # ... end end end What does AOP gain over mixins?