Format of .stringof, defined or not defined?

Jacob Carlborg doob at me.com
Fri Sep 13 00:06:26 PDT 2013


I just hit a problem in my serialization library, Orange, being 
integrated as std.serialization. The format of .stringof changed in git 
HEAD. Now, the question is should the format of .stringof be defined and 
reliable or not defined at all? Either way, this should be clearly 
stated in the documentation, which it's currently not.

Below is what's changed. It's managed to stay unchanged for the last 6-7 
years.

Before the change:

struct Foo
{
     int a;
}

static assert(Foo.tupleof[0].stringof == "(Foo).a");

After the change:

static assert(Foo.tupleof[0].stringof == "a");

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list