in reply to Help with Metaclasses
Normally, an essential part of software development is class design and those classes are usually fixed for the duration of the program. By contrast, metaclasses create classes dynamically. A common use of metaclasses is to provide optional 'aspects' to basic classes, such as logging and debugging.
I tend to stay away from metaclasses because it is harder to debug such programs. I tend to instead derive subclasses that contain the extra functionality needed so that I have multiple concrete classes: with debugging, without debugging, etc. It is more source code, but the class members are explicit and easy to see.
Then again, I may be a metaclass Luddite :)
-Mark
|
|---|