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:<br><br>int x = 2;<br><br>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.<br>
<br>I don't have a ChucK compiler where I am now, otherwise I would have done some experiments.<br><br>/Stefan<br><br><div class="gmail_quote">On Thu, Apr 23, 2009 at 10:59 AM, Kassen <span dir="ltr"><<a href="mailto:signal.automatique@gmail.com">signal.automatique@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Stefan;<br>
<div class="im"><br>
> Aha... I agree that's a bit weird. Perhaps lines like these:<br>
> y => int z;<br>
> are seen as an initialization of z, where y can be taken from the outer<br>
> scope, and not treated the same as<br>
> int z;<br>
> y=> z;<br>
> /Stefan<br>
<br>
<br>
</div>Could you explain what exactly you feel the difference might be? I<br>
don't see what you are refering to here.<br>
<br>
Yours,<br>
Kas.<br>
<div><div></div><div class="h5">_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Release me, insect, or I will destroy the Cosmos!<br>