On Wed, Oct 24, 2001 at 10:42:09AM -0700, David Whipp wrote:
> Aaron Sherman wrote:
> > All of this is still coming into focus for me, and I want to spend
> > more time reading the articles later, but for now I just wanted
> > to see if anyone else has been thinking these thoughts....
> 
> I do like the idea of AOP; but I think the mechanism you suggest
> are too clumsy. The particular weave that you are attempting is to
> add before- and after- functions to a set of existing functions.
> Ideally, this shold be imposed on the functions from outside.
> Otherwise you are simply proposing an aternative syntax for
> function calls within the sub body.

There's a problem with this. The classic problem that AOP gets around
is that these relationships require violations of the data hiding rules.

If Perl is going to have data hiding (I think I read that this was a
goal), then you cannot declare these relationships outside of the
class that defines the method. That would be like putting a "friend"
delcaration only on the foriegn class in C++. It simply should not
work that way.

AOP is intended as a design tool, not necessarily a code reuse
tool. So, when you're designing your object model, you should plan
your concerns into it, and apply AOP techniques in the classes where
they make sense.

Your suggestion also has the dubios honor of being a "come from", which
while amusing in Intercal, is probably not desirable in Perl ;-)

-- 
Aaron Sherman
[EMAIL PROTECTED]             finger [EMAIL PROTECTED] for GPG info. Fingerprint:
www.ajs.com/~ajs        6DC1 F67A B9FB 2FBA D04C  619E FC35 5713 2676 CEAF
  "Write your letters in the sand for the day I'll take your hand
   In the land that our grandchildren knew." -Queen/_'39_

Reply via email to