[Issue 23916] Non-eponymous template instances have a "type" (void)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 13 13:08:50 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23916

--- Comment #7 from Nick Treleaven <nick at geany.org> ---
Can you give examples of confusing code?

> How does it tell that to the reader, unless the reader is aware of this weird quirk in the language? 

First, you should acknowledge that the constraint is not meaningless as you
said. The usefulness of that constraint is independent of this issue.

Next, the reader should understand constraints. They don't have to know that a
template instance has void type, yet their code will magically work for people
who do know that.

> Wouldn't something more explicit be much better?

Such as what?

> What is the real use case? 

You are asking for a change so the burden is on you to justify it. If you like,
make a draft pull request and see if it breaks anything.

--


More information about the Digitalmars-d-bugs mailing list