Hello, I'm playing with the ChucK from CVS--especially with the string operators. I don't see why we can't do this: 4 $ string => string s; If we can do this: 4 + "" => string s; The latter is valid while the first once gives me this error: [test.ck]:line(3): invalid cast to 'string' from 'int'... But if the implicit cast works is valid, it seems to me that an explicit cast ought to be valid also. Cheers, Mike -- http://michaelclemow.com http://semiotech.org
Mike;
But if the implicit cast works is valid, it seems to me that an explicit cast ought to be valid also.
That would indeed seem rather logical and coherent, yes. :¬) And while we're at it; going from a string to a integer requires the Std while the reverse is (apparently now?) not true. In fact no such function is in the Std. If we're going to make this coherent then I'd like to propose that we seriously consider casting from string to int as well. I like it when things work the same in all cases, my poor little brain gets very confused otherwise. Yours, Kas.
participants (2)
-
Kassen
-
mike clemow