[chuck-users] setting static data at construction (bug)

Kassen signal.automatique at gmail.com
Tue Sep 9 18:57:37 EDT 2008

Fellow ChucKists,

I believe this to be a bug;
class foo
    3 => static int bar;


For float, int and dur making members static prevents them being set to a
default value at construction,
instead they are defaulting to 0 (or 0::ms). I ran into this with dur, where
it's obviously dangerous to make this mistake.

Of course these constructs would (probably?) mean that initialising any
instance of such a class would mean resetting the value for all instancesbut
I'm dealing with classes that exclusively have static members and not
intending to make any specific instances of them. Clearly this is easy to
get around but I still feel it's a bug.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20080910/b4e059e8/attachment.html>

More information about the chuck-users mailing list