From: Frank T. <ft...@ne...> - 2001-11-09 04:37:35
|
Juergen Hermann, at 04:35 +0100 on 2001-11-09, wrote: My original plan was to use "text-mode" (non-dynamic, source code level, static) aspects, i.e. #if MODE #code #code #endif MODE and remove/insert the "#" via that tool. Ick. We'll have to talk about this in the future when I get my stuff ready. Putting functionality in comments doesn't pass my smell test. (It's kinda like Javadoc, but without the nice run-time-accessible structure that Python strings give you). Still, it could be interesting for listing dynamic aspects it detects in the code; we'll see when you have you implementation ready. A lot will depend upon how I actually decide to make the API available, I guess. FYI, it seems like the Beaudy hook is actually not the right way for me to go about things. For one, it requires users adding an metaclass instance to their bases. That is, modifying existing code; this goes against one huge design goal of mine: to absolutely minimize the modifying of existing code. It destroys any hope of applying aspects to others' modules you are using but can't edit. However, of course, the Beaudy hook is nothing magic; it can be implemented in a roundabout way, and actually, I think implementing in the roundabout way I'm working on makes the whole thing a *lot* simpler to comprehend. It still uses metaclasses, but without the hook which makes your mind go round-and-round. Metaclasses are a simple concept. The Beaudy hook is just an evil hack for what should be something in the Python language (defining metaclasses, etc). -- Frank Tobin http://www.neverending.org/~ftobin/ |