proposed @noreturn attribute

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 18 11:11:51 PDT 2017


On Monday, 17 July 2017 at 18:54:37 UTC, H. S. Teoh wrote:
> On Mon, Jul 17, 2017 at 02:10:27PM -0400, Andrei Alexandrescu 
> via Digitalmars-d wrote:
>> [...]
> [...]
>
> IMO, the observations "used rarely" and "attention-seeking 
> notation" are better satisfied by an attribute named @noreturn 
> than some strange, convoluted, arcane invocation like 
> `typeof(assert(0))`.  Because:
>
> [...]

object.d:

alias noreturn = typeof(assert(0));

Atila


More information about the Digitalmars-d mailing list