In my experience with emulating OOP in Pd I&#39;ve had moderate success.  As a Java developer by day, I find myself attempting to recreate familiar patterns within Pd (ie: usually IoC and Flyweight in Pd).   Main problems with recreating OOP in Pd are the following:<br>
<ol><li>Everything is global</li><li>No control over abstraction (object) construction order and lifecycle</li><li>No introspection (although not required, very helpful, and don&#39;t tell me it&#39;s in some external, I don&#39;t care!)</li>
<li>No concept of &quot;this&quot;</li><li>No interfaces or abstract abstractions (to control inlet patterns)</li><li>Unfriendly and inconsistent type system (it is cumbersome in real use, although I get over this by using [list])</li>
<li>and on and on</li></ol>In most Pd patches, I see people using a few lookup tables again and again (ie: mtof).  As this is a complete waste of memory, one can attempt the Flyweight pattern.  However, doing so in Pd is a very dangerous game, as you will have NO idea which abstraction first created the table and thus have no control over retaining access to it.  In my library I&#39;ve dropped this approach in favor of something closer to IoC.<br>
<br>Basic IoC is very possible, and indeed very rewarding.  Very often I pass in other abstractions as object creation arguments.  The most simple example of this in my library is my [bypass~] abstraction used to dynamically enable and disable a given abstraction.  I use this EVERYWHERE to save CPU cycles in combination with another object to programmatically disable the sub-abstraction when the user selects a given value (ie: when the filter cutoff is at MAX with no resonance, disable the filter).<br>
<br>In use:<br><br>[bypass~ some_process~ 330 1 3 9]<br><br>Where [bypass~] expects it&#39;s 1st argument to be an abstraction and the next 10 to be arguments to that abstraction.  Every patch which uses [bypass]~ must have 1 signal inlet and 1 event inlet.  Unfortunately, this interface can&#39;t be programmatically enforced. [bypass~] passes it&#39;s 1st two inlets to the sub-abstraction, while the 3rd is used to control [bypass~]<br>
<br>I&#39;ve attached [bypass~] and it&#39;s dependencies, have fun!<br><br>~Brandon<br>