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

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sat Oct 16 05:27:42 UTC 2021


On Friday, 15 October 2021 at 19:10:42 UTC, Stefan Koch wrote:
> Seconded. The point of noreturn is precisely to reject less.
> The no-return type has no values which means reading or writing 
> that type is merely undefined behavior. It doesn't have to be 
> rejected.

If we ignore the DIP, couldn't you just as well claim that you 
should be able to assume anything about a type that is never 
instantiated as long as the assumption does not lead to a 
contradiction?






More information about the Digitalmars-d mailing list