[PD] (breaking symbols) was Re: find a list of numbers in a text file
Jonathan Wilkes
jancsika at yahoo.com
Mon Sep 5 19:58:53 CEST 2011
----- Original Message -----
> From: Mathieu Bouchard <matju at artengine.ca>
> To: Hans-Christoph Steiner <hans at at.or.at>
> Cc: Jonathan Wilkes <jancsika at yahoo.com>; "pd-list at iem.at" <pd-list at iem.at>; Chris McCormick <chris at mccormick.cx>; Miller Puckette <msp at ucsd.edu>
> Sent: Monday, September 5, 2011 1:11 PM
> Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file
>
> On Sun, 4 Sep 2011, Hans-Christoph Steiner wrote:
>
>> I think you are missing the point of what I am saying. I am not saying
> with we implement a strict duck typing mimicing Ruby or Python.
>
> I think you are missing the point of what I am saying. I am saying that you are
> using the wrong words for that.
>
>> So in the sense of Pd, anything that can be intepreted as a number should
> be. But that's in conflict with having symbols that have things that can be
> intepreted as a number. So make Pd consistent, either it needs to be illegal to
> have symbols that can be interpreted as a number,
>
> This could break some existing patches.
>
>> or maybe symbols that can be interpreted as a number behave like a float
> when something is expecting a float.
>
> That's what Tcl and Perl do for ints, floats and strings.
And that's what I want for Pd.
However, I wonder if this would cause more instances of people running out of
memory from filling up the symbol table. Currently if you generate an error from
sending a symbol atom where a float is expected, you know something screwy is
going on, post to the list, and figure out the problem and generate float-atoms
instead. However, if that's not an error, you increase the chance of someone
needlessly generating lots of unique symbol-atoms (maybe with an accumulator,
or importing them from a database as symbol-atoms instead of floats), and having
problems or crashes that are less obvious.
-Jonathan
>
> They don't call it duck-typing though, and no-one does.
duck-taping? No.
How about goose-for-duck-swapping? As in you send a duck (A_SYMBOL), and
if the object expects a number then Pd swaps the duck for a goose (A_FLOAT).
>
> _______________________________________________________________________
> | Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
>
More information about the Pd-list
mailing list