Yeah, 4 => static int i; in a class should either result in a syntax error or in 4 being assigned to i once, either at define time or the first time the class is referenced. The current behaviour is wrong.
I think it should be set at define time because of the special case that static data (in public classes) forms for ChucK. It's useful to be able to set values in classes that are never instantiated and are only used to share data across the VM. We can already do that by setting the value outside of the class in the file that defines the class but I feel this is far cleaner and less likely to lead to confusion when we have a lot of files holding a lot of classes.
If we'd really like to only set the value at the moment the class is first instantiated for some reason we could go;
class ZeClass
{
static int has_a_instance;
static int DaValue;
if (!has_a_instance)
{
1=> has_a_instance;
3 => DaValue;
}
}