On Sat, 8 Apr 2006, carmen wrote:
inside a patch needing a few additional methods (assuming it has a single inlet), i'd just wire in any number of abstractions in series.
You mean in series or nested?
inside those abstractions would be a route, for the methods which the mixin abstractions implement..
and it's even possible to make messages be both processed and continue to a nested abstraction. however, what is very much unlike OOP inheritance about it, is that the $0 is different. It's also possible to do the same message-forwarding tricks in most OOP languages (except C++ and some others) but still a lot of things get done using one instance using of several.
one place where the nested abstractions (or series of abstractions) approach loses is in cases where an object is sending messages to itself, as a matter of efficient internal organisation (especially useful in abstract classes). In a system in which messages don't have return-values, it's damn difficult to use such a feature anyway, but there would be something feasible about it, if $0 were the same in the "subinstance" (which corresponds to a superclass: sub because it's inside, super because it represents something more general.)
Mixin inheritance (as it is in Ruby, Strongtalk, CLOS or Self) is currently unimplementable in PureData, because you can't automatically eliminate duplicate "subinstances".
im fairly sure i would consider my OSC/message recording things a mixin as well, simply create one in a subpatch, and you have a local send/recieve variable which can forward arbitrary messages to the global 'recording agent'..similar to AOP logging..
er, I'm not sure what this has to do with AOP and not with just a global variable. Where exactly does an object gets automatically wrapped? The way I can explain it, in OOP a subclass wraps a superclass, but in AOP, you can also have a superclass wrap a subclass, and even both at the same time, and also unrelated superclasses can wrap each other if they meet in a certain subclass, and I mean all automatical wrappers that you never need to explicitly specify. (i'm just thinking of CLOS method lookup, haven't tried other AOP systems)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada