The current status of D?
Mehrdad
wfunction at hotmail.com
Fri Dec 2 08:28:45 PST 2011
... another bug with inout():
import std.stdio;
//Error: inout on parameter means inout must be on return type as
well (???)
class C { inout(C) foo() inout { writeln(this); return this; } }
void main() { }
IMHO, 'inout' is fundamentally flawed: it should not act like a type
constructor at all, because that makes no sense. But it seems to be what
it's doing here...
So no, I wasn't joking -- getting around these problems gets pretty
annoying (getting rid of one causes another), as trivial as you may make
them out to be. I love D's features as well, but if I have to spend a
nontrivial amount of time working around the D compiler, then I probably
wouldn't use the D compiler at all.
More information about the Digitalmars-d
mailing list