On Mon, 12 May 2003, Krzysztof Czaja wrote:
It seems to me, that Pd message is not a data structure. It is more like a command in tcl -- just a command name (selector) and arguments (atoms).
Well, due to Tcl's LISPish heritage, a command in Tcl is closer to a list than in pretty much any other non-LISP language... look at the command called "unknown": unhandled commands get sent there, and the command name becomes just another arg. Afaik that's what Tk uses to simulate OO method calling, but then the command name is interpreted as a widget name, and then the *next* argument gets interpreted as the command name... and it all looks pretty consistent syntax-wise. Here the selector is merely yet another atom.
So, it is probably safer not to think about message selector as of the message type.
Maybe not "message type", but when you have a single value passed "as if it were" a message, then it's the convention that the selector represents the type of the value, at least in PD/jMax2.
unless one would have liked to see the parallel between 'list 99' becoming 'float 99' in Pd and [list 99] evaluating to 99 in tcl...)
In Tcl, there are no types at all (or actually typing are an optimisation that is not part _at all_ of the language specification, and wasn't there until version _8_). This is what allows the same data to be reparsed as both float and list. I don't see an equivalent in PD.
Mathieu Bouchard http://artengine.ca/matju