<div dir="ltr">Stefan Blixt;<span dir="ltr"></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">
Aha - so the initialization of a static member of a class doesn&#39;t work at all. I see. I am a bit confused about the mixing of static variable declarations and constructor code in classes - I would think it would be more clear if the two were separated syntactically somehow. But I guess it will work this way also.</div>
</blockquote><div><br>Yes. I do suppose this bug/feature could be a side effect of a desire to avoid having new instances reset the values of static members... but then again those static members don&#39;t belong to instances at all and instead belong to the class itself. <br>
<br>I could also imagine that the desired functionality might be to have &quot;3 =&gt; static int foo;&quot; only run when the class is defined and not when it&#39;s instantiated. Actually that would make sense to me. At any rate I object to the above being functionally identical to &quot;static int foo;&quot; with no warning.<br>
<br>It&#39;s interesting to note that ChucK does try;<br>This;<br>----------------<br>class foo<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; 4.3 =&gt; static int bar;<br>&nbsp;&nbsp;&nbsp; }<br></div></div>---------------<br>Does give a error about being unable to resolve the ChucK operator on types float and int.<br>
<br>Kas.<br></div>