On Saturday, 14 December 2013 at 06:23:28 UTC, logicchains wrote:
On Saturday, 14 December 2013 at 05:44:43 UTC, Rikki Cattermole wrote:
Honestly I've never written code like that. But then again I've never had 10+ constants of same type in one file before... For me personally its easier to read as not having the type duplicated. I'd rather read it once and keep it in mind for a whole block of them. But I don't mind being unique in this way.

I realised it was possible to use untyped constants in D and removed the types, allowing me to declare all the constants in a single enum. Now it looks quite similar to the Go constant declarations.

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!

Reply via email to