proposed @noreturn attribute

Guillaume Boucher via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 16 14:17:30 PDT 2017


On Sunday, 16 July 2017 at 20:15:11 UTC, Timon Gehr wrote:
> On 16.07.2017 21:49, Guillaume Boucher wrote:
>> On Sunday, 16 July 2017 at 12:41:06 UTC, Timon Gehr wrote:
>>> It is therefore most natural to say that Bottom.sizeof == ∞.
>> 
>> True, but size_t.max doesn't have the properties of ∞.
>> The only sane choice to me seems to be a value of type Bottom, 
>> i.e. is(typeof(Bottom.sizeof) == Bottom).
>> 
>
> In this case, Bottom.sizeof is a value of type Bottom, which 
> must not exist.

It doesn't exist during runtime, but there's no problem to just 
generate assert(0) where it's used.

I think my interpretation produces the least exceptions, but if 
you have a better idea go ahead.



More information about the Digitalmars-d mailing list