DIP 1017--Add Bottom Type--Final Review

Nicholas Wilson iamthewilsonator at hotmail.com
Wed Jan 16 00:52:20 UTC 2019


On Tuesday, 15 January 2019 at 22:44:56 UTC, Johan Engelen wrote:
> Being able to specify `noreturn` is definitely useful. Do we 
> really need to complicate the language for it?

IMO, no.

> In case people are wondering, in LDC you can use 
> `@(ldc.attributes.llvmAttr("noreturn"))`. Ugly, non-standard, 
> yes :/

non-standardness can be fixed quite easily

version (LDC)
     enum noreturn = ldc.attributes.llvmAttr("noreturn"));
else version (GDC)
     enum noreturn = gcc.attribute.attribute("noreturn"); // ?
else version (DigitalMars)
     enum noreturn;

I think it fixes the ugliness too.



More information about the Digitalmars-d mailing list