proposed @noreturn attribute

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 17 18:07:48 PDT 2017


On 18.07.2017 03:06, Walter Bright wrote:
> On 7/17/2017 5:13 PM, Timon Gehr wrote:
>>> (Reminds me of divide by 0 discussions in calculus class.)
>>
>> The reason division by 0 is left undefined is that instead saying 1/0 
>> = ∞ introduces a new number ∞ that does not play nice with the axioms 
>> of a complete ordered field.
>>
>> The question for instance size is based on the wrong assumption that 
>> there is such an instance. It is true none the less that ∞ is the most 
>> natural answer to this question, as if you have multiple answers for 
>> instance size, you'd take the supremum. Of course, size_t does not 
>> contain ∞.
> 
> Infinity makes sense for 1/0, but I don't see how that automatically 
> transfers to size_t.

It does not. The reasoning is unrelated.


More information about the Digitalmars-d mailing list