proposed @noreturn attribute

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 20 05:13:19 PDT 2017


On 20.07.2017 00:21, Tobias Müller wrote:
> Timon Gehr <timon.gehr at gmx.ch> wrote:
>> [...]
>> What I am saying is: in a language with a bottom type, we can create a
>> function:
>>
>> T f(T)(Bottom b){
>>      return b; // assuming b converts to all types implicitly.
>> }
>>
>> Within the function body, b is a value of type Bottom.
>> We use a value of type Bottom to create a value of any type we want.
> 
> As I understand it, you can create *variables* of type Bottom but not
> *values*.

Correct.

> b is a variable, not a value,

Within the function body, it is.

> you cannot actually call that function at runtime.
> 

Correct.


More information about the Digitalmars-d mailing list