----- Original Message -----
> From: Mathieu Bouchard <ma...@artengine.ca>
> To: Hans-Christoph Steiner <h...@at.or.at>
> Cc: Jonathan Wilkes <jancs...@yahoo.com>; "pd-list@iem.at" <pd-list@iem.at>;
> Chris McCormick <ch...@mccormick.cx>; Miller Puckette <m...@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
>
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list