[PD] OOP practices in Pure Data

Mathieu Bouchard matju at artengine.ca
Wed Nov 30 20:51:59 CET 2011


Le 2011-11-30 à 13:31:00, abel.jerome at free.fr a écrit :

> All along years of practice, I've developped with Pd as well as object 
> oriented languages. Some methods and designs from OOP (object oriented 
> programming) structure my patches, because I think they are very useful 
> to clear thoughts and share patches.

a few questions :

So are you really commenting about OOP techniques, or are you commenting 
about programming conventions of all kinds ?

How do you justify that $0- variables are like the «private» keyword in 
OOP ? Can we really say that there's anything like the «private» keyword 
in Pd ? Isn't $0- more like object-level scoping rather than access 
specifiers of the public/protected/private kind ?

Why are the three parts of your MVC design patterns not matching the 
Model/View/Controller separation that gave the name to MVC ? Why would .h 
files and/or class interfaces, be considered as one of the three parts of 
MVC ?

Why don't you distinguish between messages, selectors and methods, in your 
naming ?

Why do you make a subpatch for communication and then use named 
send/receives inside of it to send to other subpatches ? What do you gain 
from this ?

Why do you join [initbang] and [loadbang] together as a single [r 
$0-loadbang] that receives _two_ bangs per object-setup ?

Why does [symbolIsEmpty] notifies only when the symbol is NOT empty ? And 
then, wouldn't it be better to output a 0 or 1 float instead, just like 
[==] would do ?

In pd-oop-good-practices.zip, where is the line between what you are 
trying to show about OOP, and the supporting elements that aren't supposed 
to be part of your discourse ? What are the things that we are supposed to 
learn from that document ? What makes those practices good, and why ?

  ______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC


More information about the Pd-list mailing list