@noreturn ?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Dec 24 20:26:02 PST 2011


On 12/24/2011 06:58 PM, Vladimir Panteleev wrote:
> On Saturday, 24 December 2011 at 20:09:46 UTC, bearophile wrote:
>> GNU C has a noreturn attribute since a lot of time. I don't fully
>> understand why such attribute is so useful in C programs, but is
>> something like a @noreturn function attribute useful in D too? Maybe
>> to implement a better halt assert(0)?
>
> How about: scope(success) assert(0); ?

The attribute should be migrated to the signature of the function such 
that calling code can take advantage of it.

I personally think this is a small matter. Right now we have bigger 
rocks to move. It would be great if 2.058 had all [tdpl] bugs fixed.


Andrei


More information about the Digitalmars-d mailing list