--- Comment #2 from Andrej Mitrovic <> 2012-07-25 
09:02:56 PDT ---
If you use enum arrays with writeln() you would typically use shorter names. My
issue is that this can make reading output ambiguous:

enum X { foo }
enum Y { foo }

void main()
    X x;
    Y y;


In C++ you don't have to use the enum tag, but in D you do, and it would make
sense to output the correct type definition.

Consider another case which is why I filed this:

enum Type { Class, Struct, Enum }

struct Class { }
struct Struct { }
struct Enum { }

void main()
    Type[string] type = ["foo" : Type.Class];


This output confused me since Class is both a struct definition and a named
enumerated value. I use writeln() almost strictly for debugging and I would
really want to see *valid* type info, which means a string representation that
could be re-inserted into code which you could practically mix in (not that I
would do that but it makes sense to keep a 1:1 mapping like this).

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to