proposed @noreturn attribute

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 16 05:46:20 PDT 2017


On 07/15/2017 11:30 PM, Walter Bright wrote:
> On 7/13/2017 5:18 PM, Andrei Alexandrescu wrote:
>> On 7/13/17 2:37 PM, Timon Gehr wrote:
>>> On Thursday, 13 July 2017 at 17:25:18 UTC, Timon Gehr wrote:
>>>> Anyway, my assertion that Bottom cannot be a subtype of all other 
>>>> types was actually incorrect: the compiler does not need to generate 
>>>> code for implicit conversion from Bottom to some other type, so it 
>>>> can be treated as a subtype.
>>>> ...
>>>
>>> (Actually, there are some complications like the .sizeof property. 
>>> Anyway, it is clear what the semantics of Bottom are, no matter 
>>> whether it is subtyping or implicit conversion.)
>>
>> I wonder if sizeof could be made size_t.max. -- Andrei
> 
> I thought bottom.sizeof would be 0.

My thinking comes from bottom being the subtype of all types in the 
universe. Therefore, it must include the state of all types. But let's 
wait for Timon. -- Andrei


More information about the Digitalmars-d mailing list