[PD-dev] $0 in messages, was: multiple $arg-expansion

cdr ix at replic.net
Sun Jan 22 00:27:11 CET 2006


> But with pd-0.39 this issue is solved thanks to the [list] object,

justa bout every patch i've made (from 0.36 to 0.39) involves :

- an inordinate amount of objects just adding and removing selectors eg turning lists into non-lists and vice-versa

- crazy dances to get into get instance variables into messages alongside and mixed with local variables (i was appalled that the documentation suggests using a bunch of [symbol $0] [float $0] and unwieldy chained series of makefilenames (since theres only one substitution per object, and even though youre not making filenames) when later discovering this could all be reduced to a single [sprintf] but this object was never mentioned in the docs)

- similar crazy dances to things like asd-$0 instead of $0-asd, the equivalent of say indices [1..3] of a list but sometimes its [2..5] and simulating nested lists

- simulating key / value stuff and naming list elements (via fake nested lists) so that you dont have to worry so much about ordering stuff, esp when reusing abstractions in difft places, and to be able to think in terms of named variables instead of rememerbing wtf $3 was

i love Mathieu's idea of a documentation for the similarities that all or most classes share - learning all these peculiarities up front would have removed a big barrier of entry in terms of getting up and running fast..

imo a few additions to the message syntax would solve most of these problems and make it much easier to see what a patch does by glancing at it

who does that best? C's sprintf? "or #{@ruby} " or maybe "ecma"+script?




More information about the Pd-dev mailing list