DIP 1017--Add Bottom Type--Final Review

Neia Neutuladh neia at ikeran.org
Thu Jan 17 18:00:51 UTC 2019


On Thu, 17 Jan 2019 17:17:45 +0000, Tim wrote:
> An advantage of the bottom type over an attribute is, that it is part of
> the function type. A library allowing to set a custom error handler
> could specify that the error handler must not return:
> alias ErrorHandler = TBottom function(string msg);

It was unclear to me, however, whether you could implicitly convert a 
TBottom function(string msg) to an int function(string msg). It's much 
more common to have a bunch of handlers, most of which should complete 
properly and only one of which aborts the program every time.


More information about the Digitalmars-d mailing list