[PD] Finding "$0" and dealing with it in messages

Matteo Sisti Sette matteosistisette at gmail.com
Sat Nov 14 00:35:27 CET 2009


 > The way I see is that $1...$n are related to the inheritance concept.
 > They
 > could be used inside [send~] & [receive~] objects to force some
 > sort of
 > locality, but you can't really guarantee locality by that, it is just
 > some way around that is not 100% safe

There's no guarantee of "locality" whatsoever in using $0 either. If you 
create a [send $0-xxx] and the identifier of the containing (instance of 
an) abstraction happens to be 1032, and then in some other patch or 
abstraction you have a literal [receive 1032-xxx], the "locality" will 
be lost.


Using $0 as a prefix to the name of "local" sends and receives preserves 
locality only provided that you never use "literal" numbers as a prefix 
in the name of sends or receives.

So $0 is not so different from other creation arguments (i.e. $1...); 
the difference is that it is assigned automatically by the system and 
that it is done in such a way that no two instances of any abstraction 
will have the same value of $0.

Using it for creating "local" names is just one way of using it, just as 
you can use explicit creation arguments for the same purpose (by taking 
the responsibility of ensuring uniqueness), although it is probably its 
main "intended" use.

-- 
Matteo Sisti Sette
matteosistisette at gmail.com
http://www.matteosistisette.com




More information about the Pd-list mailing list