proposed @noreturn attribute

bachmeier via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 8 04:07:32 PDT 2017


On Saturday, 8 July 2017 at 10:15:39 UTC, Walter Bright wrote:

> Having an @noreturn attribute will take care of that:
>
>    @noreturn void ThisFunctionExits();

Why should this be an attribute rather than a pragma? It looks to 
me that the goal is to pass information to the compiler, and 
according to the spec:

"Pragmas are a way to pass special information to the compiler 
and to add vendor specific extensions to D. Pragmas can be used 
by themselves terminated with a ‘;’, they can influence a 
statement, a block of statements, a declaration, or a block of 
declarations."


More information about the Digitalmars-d mailing list