[PD-dev] $0 in messages, was: multiple $arg-expansion
Hans-Christoph Steiner
hans at eds.org
Mon Jan 16 07:39:46 CET 2006
On Jan 15, 2006, at 6:49 PM, Thomas Grill wrote:
> Hey all,
>
>> The only advantage I can see to the addition of # args is shortcuts.
>
> that's one advantage and it's an important one. When building more
> complex messages the [unpack], [f $x], [pack], [msg x $1 y $2( thing
> is a real pain, both for performance and for the eye.
Programming with Pd is done with connecting objects and message boxes,
so I think that we should stay true to this instead of making shortcuts
which are more suited to a text language. I have done a lot of complex
message handling in Pd I haven't found this to be a major hinderance.
What is a major hinderance is the list vs. undefined set quandary.
Much if not most of this problem was caused by the shortcut of allowing
sets starting with a float to be lists. So shortcuts can do real
harm.
>> But that would be at the expense of syntactic and logical simplicity,
>> and my guess is that it would make code harder to read rather than
>> easier.
>>
>
> i can't follow that argument. I just returned from a beginner's
> workshop and the fact that $x means different things in the same patch
> was obviously confusing for the people. It's much easier to read and
> understand that $x are always message parameters and #x are always
> abstraction arguments.
I suppose the visual nature of Pd makes seeing $1 in a quick scan
confusing whether its in an object box or a message box. But because
beginners find something confusing is not reason enough to change it in
my book. If people have real problems learning it, then its a problem.
Many aspects of programming are confusing to beginners, but they pay
off in the long run. I found the messaging in object oriented
programming quite confusing when I started, functions seem more
straightforward.
Having # and $ could cause new confusions for beginners and others,
like forgetting when to use # and when to use $. I think once people
understand Pd's messaging, then it becomes much easier to read $ args.
.hc
________________________________________________________________________
____
"The arc of history bends towards justice."
- Dr. Martin Luther King, Jr.
More information about the Pd-dev
mailing list