Metaclasses vs. standard Python reflection?

Alex Martelli aleax at aleax.it
Tue May 6 02:45:44 EDT 2003


Greg Ewing (using news.cis.dfn.de) wrote:

> Hung Jung Lu wrote:
>> Three operations are: (a) insert a before-hook when calling
>> a function, (b) replace/overriding a function itself, (c) insert a
>> after-hook when calling a function. The rest is all buzz words and
>> syntactic sugar coating.
> 
> This sounds reminiscent of the Flavours system in Franz
> Lisp. As well as overriding a method outright, a subclass
> could also provide what were called a "before daemon"
> and/or "after daemon".
> 
> Maybe those guys had invented AOP all those years ago
> and didn't realise it?-)

Not really, because THE "key concept" in AOP is that you do
this *transversally* with respect to inheritance hierarchies --
modifying existing classes (without changing their source code),
rather than creating new classes by inheritance, and ACROSS a
swathe of classes not necessarily related by inheritance.


Alex





More information about the Python-list mailing list