zl vs. list [was: Re: [PD] PDDP meeting?]
Frank Barknecht
fbar at footils.org
Tue May 9 09:42:31 CEST 2006
Hallo,
Krzysztof Czaja hat gesagt: // Krzysztof Czaja wrote:
> hmm... I tried to explain this in another thread. Let me try
> again:
>
> 1. It is probably fair to say that the Pd rules of message typing
> are better than the old rules still preserved in Max.
> Nevertheless, Pd is just as unsuitable for list processing as Max.
I'm concerned with actually using Pd for list-processing, regardless
if it is unsuitable or not. Maybe that's the point where we disagree
about how zl/prepend/list should behave.
> 3. Regardless of the rules, [zl]'s and [prepend]'s way of
> conversion, i.e. discarding of the 'list' selector of symbolic list
> messages is just as bad, good, or irrelevant as the [list]'s way of
> conversion, i.e. prepending of the 'list' selector to non-list
> messages -- the same bit of information is lost.
If one uses Pd to work on lists, then it is very helpful to only deal
with list-messages. For example, sending "list a b c d" through just
one [zl join] in a patch will make a message substitution like [$2 $3(
substitute the "wrong" list positions ("c d"), because zl removed the
list-prefix and effectively the first element as well, which now is
the selector.
This is confusing many users. I'm sure they wouldn't be as confused if
the would have used [list] so that [$2 $3( can give back "b c" as
expected.
Where I use [zl], I always put a [list] after it to get back the full
list again. It just lets me sleep better to always have the
list-selector until I want to call an object's method.
> 4. In nearly all cases when [prepend] is really needed, it is used
> for assigning a selector to a message. Inserting [prepend add]
> before a [textfile] is more natural, than inserting
> [list prepend add] -> [list trim].
That's true. I proposed to use an abstraction called [prepent] build
from [list prepend $1]-[list trim] in these cases, but of course
[prepend] is made for this. My argument is just, that because of its
selector-mangling it is not useful for list-processing at all. Hm, but
then we're back at the start.
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
More information about the Pd-list
mailing list