enum VS static immutable

ref2401 refactor24 at gmail.com
Thu Mar 13 07:38:26 PDT 2014


Hi.
I have this structure:

struct MyStruct {
	enum MyStruct VALUE = MyStruct(5f);

	static immutable MyStruct value = MyStruct(5f);


	float data;

	this(float v) { data = v; }
}

What's the difference between MyStruct.VALUE and MyStruct.value? 
How should I decide what to use?


More information about the Digitalmars-d-learn mailing list