How about
string `error_name() = "MyError";
? If all we need is syntatic sugar, there are various ways that sugar could look.
#define is not what I want because it has a completely different (flat) scope system. Among other things, you can not access #defines in modules by indexing the module. Also, a #define contains a sequence of tokens rather than a value, which can be problematic at times.