I'm using Pd vanilla 0.50-2, Ubuntu 20.04.
I'm struggling to find a naming convention for inserting $0 into identifiers that works seamlessly throughout Pd, given that:
-
the expr* family does not handle well the traditional convention "$0-name" (interpreted as "number minus") and "$0name" (invalid as a C identifier)
-
iemgui property dialogs change $0 to 0 when $0 is not in the first position
I would appreciate finding a workaround for (1). There is a workaround for (2) which is using #0 instead of $0 in iemgui property dialogs. I wouldn't call this workaround "seamless" for some reasons: (I) such a use is not to be found anywhere in Pd inline documentation nor in https://puredata.info/docs/manuals (I even tried https://git.iem.at/pd/iemgui with no success), turning it into a sort of alchemic secret (or more concretely, creating the impression that it may not be available in the long-term); (II) it makes dynamic patching as well as text editing pd patches much more convoluted (right now I'm writing sed scripts for changing naming conventions in hundreds of objects, and some demand $ but others demand #...).
The reason I'm writing here is to gather information on the matter. I can't figure out whether there is room for suggesting developmental improvements in either the expr family or the iemgui family, as far as dollarsign substitution is concerned. As per https://puredata.info/docs/manuals/pd/x2.htm#s6.5 the prefixed naming convention ($0-name) should be preferred, where it is also mentioned that "the expansion of variables (...) only works at the beginning of the symbol", but apparently such understanding has changed in recent implementations. From a user point-of-view, it would be amazing if expr* handled $0-names exceptionally as symbols and if iemgui's property dialogs handled $0 anywhere in send/receive symbols (as they already do in the first position, where $ is not substituted for #).
Last but not least, I apologize in advance for asking a question that most certainly has been asked before. The curse on dollarsigns and hashtags makes it also nearly impossible to find related messages in this forum, github, etc.