[PD] suggestion: $0 in messages

Jonathan Wilkes jancsika at yahoo.com
Tue Apr 3 15:52:32 CEST 2018


> Why is nobody complaining about not being able to use the third > creation argument directly withing a message? What's the fuzz about the
> $0?
$0 isn't part of the argument vector. It's a unique id automatically generated for a patch/abstraction which the user happens to access through a dollarsign variable.

That locality hack doesn't require that the unique id be fetched by an unused dollarsign arg. For example, you could reserve the keyword "let" such that a message box with "let token2" would get converted behind the scenes to "1003-token2".
When users for a decade have said they wanted $0 in msg boxes, they mean that they want to use Pd's notion of send-symbol locality inside message boxes. They want that instead of manually querying  the value of a reserved dollarsign variable and sending that value to the relevant message box in order to get "let" behavior.
Also, since "$0" is already being used for this purpose it doesn't make much sense to try to also get "$0" to refer to the selector. You'd end up with inconsistent meaning where it fetches the selector in msg boxes but not in object boxes. Plus you can already get the selector of an incoming message with [list] whereas you cannot get an abstraction's selector (which would be handy for error reporting). So adding that inconsistency would only duplicate existing functionality without adding new functionality. 
-Jonathan

> Roman_______________________________________________
Pd-list at lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180403/36ad2973/attachment.html>


More information about the Pd-list mailing list