[PD] [inlet], [outlet].
Mathieu Bouchard
matju at sympatico.ca
Sun May 11 22:21:43 CEST 2003
On Thu, 8 May 2003, Miller Puckette wrote:
> I always intended for "float 99" and "list 99" to be exactly
> equivalent in Pd. I think this has caused problems in trying to make
> certain objects compatible with Max, in which they may be treated
> distinctly (but never really _should_, I don't think, since it's too
> comfusing. Also, "list" with no argument is the same as "bang"...
Given that an object is different from a single-element list/array
containing it, when programming in C/C++, Pascal/Delphi, Java, C#, BASIC,
ADA, Perl, Python, Ruby, Lua, PHP, TCL, CommonLisp, Scheme, Smalltalk,
Self, Javascript, APL, Prolog, ML, Haskell, Max, jMax,
... then I don't know why PD would do things differently.
I can't name a major language doing it the PD way. I can't even name a
minor language doing it the PD way (though there probably are).
And then from the perspective of GridFlow: it has to follow the APL data
model, so it has to make the difference between a scalar, a 1-vector, a
1x1-matrix, and so on.
Then in the portability layer of GridFlow (which lies between PD/jMax and
GridFlow proper), an empty message is converted to a bang message, but an
empty list is not the same as an empty message: an empty list is a list
message with no arguments.
that is:
foo.send_in 0 # sends a bang in inlet 0
foo.send_in 0, :bang # sends a bang also
foo.send_in 0, :list # sends an empty list
foo.send_in 0, 1.618034 # sends a float
foo.send_in 0, :float, 1.618034 # sends a float too
foo.send_in 0, :list, 1.618034 # sends a 1-element list
Now, I can understand that "bang" is sort-of like "void" which is sort-of
like "nil" which in some languages is also equated with empty-lists, but
it seems to me much less justifiable to equate single-element lists with
their contents. Maybe I'd like some more explanation of this.
(PS: in some of the aforementioned languages, there are some ways that the
single-element list can be conflated with its content, but usually it's as
a shorthand or otherwise secondary usage: it only goes on top of the more
basic concepts).
________________________________________________________________
Mathieu Bouchard http://artengine.ca/matju
More information about the Pd-list
mailing list