Discussion Thread: DIP 1034--Add a Bottom Type (reboot)--Final Review

Max Haughton maxhaton at gmail.com
Wed Sep 23 11:55:52 UTC 2020


On Tuesday, 22 September 2020 at 21:52:24 UTC, Paul Backus wrote:
> On Tuesday, 22 September 2020 at 17:46:07 UTC, Imperatorn wrote:
>>
>> Well, what about determinism, reasoning about halting, 
>> real-time contexts, time sharing, functional safety, 
>> async/await control, FSM constraints, resource management,..., 
>> etc
>>
>> Well, strictly not bottom type, but it could be related,like 
>> (pseudo-code) @timeout(500.msecs, doSomething(), return 
>> something)
>
> This kind of thing can (and should) be implemented as a 
> library. There's no reason to make it part of the type system.

It would also some baggage to the standard (i.e. D assumes more 
things than some languages in its standard), not all machines 
would have the mechanism to implement it.

One thing this construction would require which I would quite 
like (although I can't quite see how it would be done cleanly) is 
some way of a UDA "knowing" what it is attached to i.e. currently 
@attr void func() {} can only do work if something looks from the 
top down at the scope it's in. There's probably a DIP in it 
somewhere but doing it nicely would need to be thought out 
properly.


More information about the Digitalmars-d mailing list