"I told you so": noreturn sucks a leech and has virtually no utility

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Oct 15 17:13:29 UTC 2021

It has been predicted by several folks that noreturn has very limited 
utility and a variety of weird corner cases that will cause a hecatomb 
of complications in the language, the standard library, and the 

(For starters: how the hell is "will not return" a type that's supposed 
to do all or at least most things that types do, when even the phrase 
defining it has no subject? It's about a FUNCTION that won't return, so 
it should be an attribute applicable to a FUNCTION!)

In spite of these voices of reason, noreturn proceeded with a definition 
and implementation as expected: execrable.

I was looking today through the wretched isAutodecodableString (how did 
we ever think /that/ was a good idea?) and found a number of weird 
occurrences of noreturn. Where? Of course, where you least expect or 
want it.

Thirty-seven `noreturn` occurrences in phobos.

Ten opened bugs.

This is literally why we can't have nice things. If all that investment 
went to literally any other proposal, it would be a net positive.

More information about the Digitalmars-d mailing list