@noreturn property

bearophile bearophileHUGS at lycos.com
Thu Oct 21 14:35:04 PDT 2010


Nick Sabalausky:

> One of the nice things about that is you don't have to provide a "fake" 
> return type. For instance, with your "@noreturn": "@noreturn int foo()" 
> would be legal, but wouldn't make any sence. And in a way, even "@noreturn 
> void foo()" isn't great since a "void" return value suggests that it at 
> least returns.

I suggest to keep things simpler, minimize changes to other parts of D, and avoid creating new keywords for this very minor feature, and allow only the signature:
@noreturn void somefunctioname(...)

So this is an additive change to D2, and may be added later.

Bye,
bearophile


More information about the Digitalmars-d mailing list