[chuck-users] Inner loop array index bug

Stefan Blixt stefan.blixt at gmail.com
Thu Apr 23 06:43:03 EDT 2009

Well, it's all uncertain speculation, but in Java, where you have places in
the code what may not contain code other than variable declarations, you can
write stuff like this:

int x = 2;

which can be handled by the compiler with special optimization. I think Java
also handles declarations and assignements specially when use in a block
(like a method or loop). I was wondering if there may be a similar
optimization in ChucK, which is obscured by the fact that you can mix code
and declarations everywhere.

I don't have a ChucK compiler where I am now, otherwise I would have done
some experiments.


On Thu, Apr 23, 2009 at 10:59 AM, Kassen <signal.automatique at gmail.com>wrote:

> Stefan;
> > Aha... I agree that's a bit weird. Perhaps lines like these:
> > y => int z;
> > are seen as an initialization of z, where y can be taken from the outer
> > scope, and not treated the same as
> > int z;
> > y=> z;
> > /Stefan
> Could you explain what exactly you feel the difference might be? I
> don't see what you are refering to here.
> Yours,
> Kas.
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

Release me, insect, or I will destroy the Cosmos!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090423/ce2d8341/attachment.html>

More information about the chuck-users mailing list