enum VS static immutable

2014-03-13 Thread ref2401
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

Re: enum VS static immutable

2014-03-13 Thread w0rp
On Thursday, 13 March 2014 at 14:38:27 UTC, ref2401 wrote: 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

Re: enum VS static immutable

2014-03-13 Thread ref2401
thank you

Re: enum VS static immutable

2014-03-13 Thread Ali Çehreli
On 03/13/2014 07:38 AM, ref2401 wrote: 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