Changes before 1.0
Unknown W. Brackets
unknown at simplemachines.org
Sat Dec 2 16:20:59 PST 2006
Personally, I think it wouldn't be hard for the compiler to do this for
you, but only bloat your code with it if it's ever used.
For example:
enum Example;
writefln("%s", Example.names[some_value]);
Or whatever. Then again, maybe it's non-trivial to detect the usage. I
wouldn't think so, though.
-[Unknown]
> IMO, a nice way to bloat your executable code. I'd recommend placing
> this feature on a debugger, and the string repr of enums should be debug
> data. If you need string equivalence for enums, you should put them in a
> separate string array, and just index it with the enum. This allows
> better description of values and also makes l10n more straightforward.
More information about the Digitalmars-d
mailing list