What's wrong with D ? this bug remains unfixed since 12 years

Timon Gehr timon.gehr at gmx.ch
Fri May 31 07:40:09 UTC 2024


On 5/30/24 20:09, Paul Backus wrote:
> Here's a list of just the bugs that I *personally* have found and 
> reported in D's IFTI:
> 
> - https://issues.dlang.org/show_bug.cgi?id=22903

Not a bug (no IFTI is involved).

> - https://issues.dlang.org/show_bug.cgi?id=22111

I agree this should ideally work, but I am not sure I would call it a 
bug per se.

> - https://issues.dlang.org/show_bug.cgi?id=23292

Seems my frontend gets this one wrong too, though technically I don't 
think the spec implies that this should work.

> - https://issues.dlang.org/show_bug.cgi?id=23645

https://dlang.org/spec/template.html#function-templates
> If a template declares exactly one member, and that member is a function with the same name as the template, it is a function template declaration. 

https://dlang.org/spec/template.html#ifti
> Function templates can be implicitly instantiated
So I guess the spec needs updating too here. It contradicts itself:
https://dlang.org/spec/template.html#implicit_template_properties

However, I do think it is not obvious from the spec that IFTI should 
even work on function template templates. (Though it makes sense that it 
would.)

> - https://issues.dlang.org/show_bug.cgi?id=23644

Here I am again not sure whether there was ever any intention for this 
to work, but it should be fixed in any case.

Overall, I think this is an issue of incomplete spec as much as one of 
implementation quality.


More information about the Digitalmars-d mailing list