proposed @noreturn attribute

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 9 06:27:26 PDT 2017


On Sunday, 9 July 2017 at 13:13:28 UTC, Andrei Alexandrescu wrote:
> On 7/9/17 1:36 AM, Walter Bright wrote:
>>>
>>> If we wanted to be cute we could use `typeof()` to represent 
>>> this type as there is no value you can give to typeof such 
>>> that it returns the bottom type. It also avoids having to 
>>> come up with some special symbol or name for it.
>> 
>> That is indeed an interesting idea. Thanks!
>
> We should use typeof(assert(0)) for Bottom. There is precedent 
> - there is no name for typeof(null). -- Andrei

I agree with is approach.
It does not add a magic Type :)



More information about the Digitalmars-d mailing list