Aspect Programming Module

Will Stuyvesant hwlgw at hotmail.com
Thu Apr 15 05:10:37 EDT 2004


> [Joe Mason]
> > "AOP is a contrived way to get around the limitations of a statically
> > typed language."
> 
> Care to explain that?  What I've seen of AOP seems like a very dynamic
> design philosophy.

Dynamic indeed.  And that is a problem for statically types
programming languages like Java.

To add logging capabilities to an instance object of a Python class
you simply add a function/method that does the job.  Add it as an
attribute to the object itself, or to the object's __class__, or to
anything else you can get at via the object and its attributes.

You can not do that in Java because the Java class definition is
"fixed", you can't change it.  But they still want to do it, so they
use a complex AOP framework to do it in.



More information about the Python-list mailing list