On Jan 21, 2006, at 2:34 PM, Mathieu Bouchard wrote:
On Mon, 16 Jan 2006, Hans-Christoph Steiner wrote:
What is a major hinderance is the list vs. undefined set quandary.
One major hinderance is your insistence on calling them undefined sets. The fact is that they're neither undefined nor sets. In PureData those things are called messages. Messages have selectors. Selectors are used to select methods.
Suppose that the Pd of your dreams comes to existence, and that may mean without any so-called "undefined sets". Every message would be a "list". Then how would you send a message like "set $1" or "color $1 $2" to an object? somehow the list method (which is then the only method in each class) would have to deal with all messages. Then a neat idea to break down the code in more manageable bits would be to select one of several C functions depending on the first element of the received list. This first argument could be called a "selector". But now, what about a list-processing object that really needs to be able to receive a list in the same inlet as you would use to do "set" and "color" and such? To disambiguate this, let's prefix the lists intended for list-processing with a special selector that we might call "list".
Thus messages would be called lists and former lists would be called something else like "really lists" but there might be better names. And then again there would be things that are lists but not "really lists" and there appear again the "undefined sets" that aren't undefined nor sets.
Or have I missed any important detail?
"undefined sets" are sets of atoms that are not a symbol, float, pointer, or list. A message can be made up of a symbol, float, pointer, list, or a set of atoms that is none of those types. All of these are messages, all with selectors (albeit sometimes its an implied selector). "A set of atoms that is not a symbol, float, pointer, or list" is an "undefined set".
Check out [pd some odd cases of list handling] in doc/pddp/all_about_lists_vs_anythings.pd if you want to see specific examples of problems caused by this
It seems to me that the heart of the problem is the implied selectors, i.e. [1 2 3( == [list 1 2 3(. Also, there is inconsistent behavior with lists in a number of key objects, like [route] and [print].
.hc ________________________________________________________________________ ____
"I have the audacity to believe that peoples everywhere can have three meals a day for their bodies, education and culture for their minds, and dignity, equality and freedom for their spirits." - Martin Luther King, Jr.