What are Aspects? (Re: How can I make my assertions smarter?)
Aahz Maruch
aahz at netcom.com
Thu Nov 11 10:46:23 EST 1999
In article <slrn82h5o6.26j.wtanksle at hawking.armored.net>,
William Tanksley <wtanksle at hawking.armored.net> wrote:
>>Aahz Maruch wrote:
>>>
>>> Sounds like templates to me, or Python's "mix-in" classes. Am I missing
>>> something?
>
>The _primary_ idea, though, is that aspects can contain functionality
>which classes simply can't. In order to implement reference counting with
>classes, for example, you have to modify tons of source code by hand, all
>in seperate classes. If you use aspects, though, you can start with code
>which has _no_ memory management, and write a single aspect which
>describes reference counting, and have most of your memory management
>problems solved. (A second aspect might help with cycles, and yet another
>aspect to handle some memory management staticly, since in some cases it's
>easy.)
I feel like I'm still missing something. What if you only want half of
your classes to get ref-counting? Or are you saying that aspects are by
definition applied across *all* code, and that they're more like hooks
into the Python interpreter?
--
--- Aahz (@netcom.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
More information about the Python-list
mailing list