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

Steven Schveighoffer schveiguy at
Tue Sep 22 14:16:19 UTC 2020

Well written and very compelling!

I have a couple feedback points:

1. In "The cast operator":

int x;
int bar();
auto foo() {
     cast(noreturn) (x = bar()); // same as {x = bar(); assert(0);}

This is odd, and I'm not understanding the reason for the cast if you 
aren't assigning.

Also, earlier you say that you can declare a noreturn variable, but as 
long as you don't use it, you don't generate the assert 0. Is this 
example a contradiction of that?

2. Inside Description, change (3) "Implicit conversions from `noreturn` 
to any other type are allowed", I am having a difficult time with rules 
6 and 7:

/* 6 */ !(is(T == function)) || is(noreturn* : T)
/* 7 */ !(is(T == delegate)) || is(noreturn* : T)

What are these trying to say? I think these rules need some 
clarification or rewriting


More information about the Digitalmars-d mailing list