On Saturday, 14 December 2013 at 09:09:21 UTC, Rikki Cattermole wrote:
Personally for me its going a little far just having enum { with multiple types being used as a value. But hey as long as everyone can understand it, no problems!

I prefer untyped constants as they can be used as different types in different places, like #define'd constants in C. If constants are too strongly typed, it can lead to awkward situations such as in the Rust code where two constants for the same value were used in order to avoid a heap of ugly casts:
static StartRangei : u32 = 15;
static StartRangef : f64 = StartRangei as f64;

Reply via email to