What are the worst parts of D?
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 21 05:43:22 PDT 2014
On 09/21/2014 09:05 AM, Daniel Murphy wrote:
> "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.
When was int x(T)=2; introduced? Also, C-style array syntax would
actually be string results(T)[] = "";.
More information about the Digitalmars-d
mailing list