Re: Help me escape optional parens hell

2017-06-24 Thread Meta via Digitalmars-d-learn
On Saturday, 24 June 2017 at 08:08:33 UTC, ketmar wrote: Meta wrote: So I have no clue what I'm doing wrong. This is driving me insane. h. known $#^#$@^@%. enum SymName = (&symbol).stringof[2..$]; // this, instead of symbol.stringof dirty hack, let's hope that DMD devs won't change `

Re: Help me escape optional parens hell

2017-06-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/24/17 3:53 AM, Meta wrote: The code: alias Response = Nullable!(string, "empty response (error)"); Response processMessage(string commandModule)(string message, bool isCommand) { import std.meta; import std.string; import std.traits; import command_uda; mixin("

Re: Help me escape optional parens hell

2017-06-24 Thread ketmar via Digitalmars-d-learn
ketmar wrote: Meta wrote: So I have no clue what I'm doing wrong. This is driving me insane. h. known $#^#$@^@%. enum SymName = (&symbol).stringof[2..$]; // this, instead of symbol.stringof dirty hack, let's hope that DMD devs won't change `.toString()` output (i.e. first two chars

Re: Help me escape optional parens hell

2017-06-24 Thread ketmar via Digitalmars-d-learn
Meta wrote: So I have no clue what I'm doing wrong. This is driving me insane. h. known $#^#$@^@%. enum SymName = (&symbol).stringof[2..$]; // this, instead of symbol.stringof dirty hack, let's hope that DMD devs won't change `.toString()` output (i.e. first two chars will alwa

Re: Help me escape optional parens hell

2017-06-24 Thread ketmar via Digitalmars-d-learn
ketmar wrote: `.toString()` toChars(). ;-)

Help me escape optional parens hell

2017-06-24 Thread Meta via Digitalmars-d-learn
The code: alias Response = Nullable!(string, "empty response (error)"); Response processMessage(string commandModule)(string message, bool isCommand) { import std.meta; import std.string; import std.traits; import command_uda; mixin("import " ~ commandModule ~ ';'); b