[PD] suggestion: $0 in messages

Jonathan Wilkes jancsika at yahoo.com
Thu Apr 5 17:21:05 CEST 2018


>> whereas you cannot get an abstraction's selector (which would >> be handy for error reporting). 

> What is the selector of an abstraction? 
[my_abs arg1 arg2]
The selector is "my_abs".
The reason consistency probably keeps coming up is because everything on the Pd canvas as well as Pd files is just a Pd message. The possibility of learning a single set of rules for how messages behave is way easier than keeping track of special cases and inconsistencies.
So having a rule, "$0 expands to the first element of the argument vector," is great if the user can be guaranteed that the rule holds regardless of context of the evaluation.
On the other hand, suppose the rule is, "$0 expands to the first element of the argument vector UNLESS we're loading a canvas in which case it expands to a unique value to simulate locality with Pd's global binding mechanism." That's harder to reason about.
If you want $0 as selector in msg boxes
you could try to teach the inconsistency by reminding users that load time and message time are completely different contexts and therefore may have different expansion behaviors for dollarsign variables. But they're still going to notice that $1-n have *analogous* behavior in each context while $0 doesn't.
Anyhow, given the choice between an inconsistency that very few (if any) ask for in daily patching and one that a multitude of users have pleaded for in daily patching, I'm obviously in favor of the latter.

-Jonathan
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180405/723cb3c7/attachment-0001.html>


More information about the Pd-list mailing list