DIP 1017--Add Bottom Type--Final Review

Simen Kjærås simen.kjaras at gmail.com
Tue Jan 15 11:18:20 UTC 2019


On Tuesday, 15 January 2019 at 10:59:40 UTC, Johan Engelen wrote:
> 4 - D already has a bottom type: `void`, why is a new type 
> needed?

Because `void` is not a bottom type - a bottom type has no 
values, while void has exactly one, and is thus a unit type. 
Proof: you can return from a void function (hence it has at least 
one value), and no information is transmitted through a void 
(hence it has at most one value).


> The declaration `extern(C) Tbottom exit();` won't mangle 
> correctly

False. C name mangling doesn't care about return types.

--
   Simen


More information about the Digitalmars-d mailing list