in reply to Re^4: Aspect-Oriented Programming: Couple of Short Examples
in thread Aspect-Oriented Programming: Couple of Short Examples
I'm curious - how do you see Perl or C++ or Java lacking this behavior? I know that my personal baseclass has the following lines in the new() call:
That way, I can define a method init() in every class that derives from this baseclass (which is just a way of encapsulating getter/setter/mutator generation and enforcing attribute creation) and I seem to have the same behavior you're touting Python for ...?my $init = $self->can('init'); $init && $init->($self, @_);
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Aspect-Oriented Programming: Couple of Short Examples
by adrianh (Chancellor) on Aug 07, 2003 at 08:51 UTC | |
by dragonchild (Archbishop) on Aug 07, 2003 at 13:05 UTC | |
by adrianh (Chancellor) on Aug 07, 2003 at 13:21 UTC |