[PD] using mysterious list pseudo-object -- unwise?

Krzysztof Czaja czaja at chopin.edu.pl
Tue Aug 21 16:35:49 CEST 2001


I suspect many Pd users know of undocumented 'list' pseudo-object.
This is not an object per se, but anyway passing list selector with
exactly one argument to the 'newclass object' _works_ and can be
useful.  But should I treat this as black magic or a legal construct
and is it going to stay in Pd for good?

Why it can be useful?  Consider [list $1] -> [route float] in an
abstraction which could thus accept both float and symbol values of
the same abstraction argument (well, [makefilename $1-dummy] accepts
different types also, but converts them to symbols).

Why this works?  There is no 'list' class defined in Pd => 'newclass'
has no list method => default list method is used, which treats
one-argument lists as symbols or floats => symbol or float object
is created.  So [list hot] is simply [symbol hot] and [list 40] is
equivalent to [float 40] (or [40] for that matter).

What the future holds?  Will this proxy transform into list object
proper -- a storage place for lists as zexy's lister (there is no
such in max, but at least max value object can be of any type).
Or is this little trick to be blocked altogether.


(and I could be simply out of my wits, this is really a hot day...)

More information about the Pd-list mailing list