[PD] Why is sendlocal/receivelocal deprecated?

Jonathan Wilkes jancsika at yahoo.com
Wed May 19 01:30:27 CEST 2010


When you create these objects, a console message says to use [send $0-var] instead. 
But sl/rl actually function differently than s/r $0-var because sl/rl are local to a subpatch, 
and thus behave more like local variables (i.e., local only to the (sub)canvas in which 
they appear).

Practical example: if I have an [until] loop inside another [until] loop, I can put the nested 
one in a subpatch and use [sl br]/[rl br] for both cases (or even just sl/rl with no names).  
I don't have to keep track of variable names outside of the canvas I'm currently looking at.

With s/r I have to give different names to the variables.  This becomes cumbersome with 
even moderately complex patches because you either have to rely on abstractions and 
create extra files, or keep track of variable names ($0-br1, $0-br2, etc.).

-Jonathan



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100518/7fd32689/attachment.htm>


More information about the Pd-list mailing list