Well, now you had to wait for a answer for me to get round to "morning coffee", that's one side.
Yes, but on the plus side, I got to sleep, which I somehow can only do
when I hit an intractable problem.
The object thing makes much more sense now. I tell all my friends to
join the chuck list, and I think they did but I've never seen one ask
a question. I think they were angry about overloading the => operator
or something. Who knows why. Anyway, I'll ask something again around 1
a.m. tonight probably, so get ready. Thanks again,
Andrew
2009/9/15 Kassen
Andrew,
Thanks, that works perfectly. How does setting the length at initialization make logical sense? I mean that in a curious, not a critical way. I'm just not sure what the nature of the issue is, because it seems like declaring a single primitive is the same as declaring 128 of them, right? (clearly wrong).
Yes, in the case of primitives. However arrays are objects and i think it's the object that needs to be initialised. Remember that instead of floats we might have a array of "fozzbobs" where a "fozzbob" is some class that consists of 10k lines. I think ChucK treats those as more or less the same here.
I agree that it feels a bit "unfair" here but remember that a array of floats is more than just a series of primitives. You also get .cap(), .size(), you can append to it, etc. It's a real object.
And anyway, who needs examples when you have a list? Think of all the people we would never meet (figuratively) in a world of perfect documentation.
Well, now you had to wait for a answer for me to get round to "morning coffee", that's one side. I think another is that not all users are on the list and that perhaps some are too shy/modest to email questions. I'm not sure why that is but I suspect it's so. For a third reason; this is just a simple trick to get around the issue, it's not very exciting. I'd rather stuff stuff like that in the examples dir so we could get round to exciting things like how, when and why we would actually do things like this.
Yours, Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users