What are the worst parts of D?
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 21 00:05:19 PDT 2014
"Tofu Ninja" wrote in message news:nwjquvwnetifhydfabhg at forum.dlang.org...
> On Saturday, 20 September 2014 at 23:07:16 UTC, Adam D. Ruppe wrote:
> >> string results[](T) = "I have no idea what I'm doing";
> >
> > I agree that's just weird though, someone pointed that out to me on IRC
> > and I was even like wtf. I had thought I've seen it all until then.
>
> I literally don't even know what to expect this to do.
template results(T)
{
string[] results = "I have no idea what I'm doing";
}
Which won't instantiate because string doesn't convert to string[].
A fun mix of C-style array syntax, shortened template declaration syntax and
a semantic error.
More information about the Digitalmars-d
mailing list