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.

/Stefan

On Thu, Apr 23, 2009 at 10:59 AM, Kassen <signal.automatique@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@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users



--
Release me, insect, or I will destroy the Cosmos!