Feedback Thread: DIP 1034--Add a Bottom Type (reboot)--Community Review Round 1

Dukc ajieskola at gmail.com
Wed May 6 22:27:44 UTC 2020


On Wednesday, 6 May 2020 at 11:05:30 UTC, Mike Parker wrote:
> [snip]

If the compiler will really say "element type could not be 
inferred from empty array" from trying to append to array of 
`noreturn`, it's a bad error message. It would appear to complain 
about the initialization, when only the appending in the 
following line is illegal. A better message would be something 
like "Attempt to append int to noreturn[], which must always be 
empty".

Perhaps the `noreturn` name, or whatever it will be, can be 
better defined at DRuntime level, like `size_t`? It'll still be 
standard, but can be done without without adding a keyword. It 
could be what Walter suggested (`alias noreturn = 
typeof(assert(false));`), but doing `alias noreturn = 
typeof(&null)` instead might be a bit easier to implement.

I generally liked the rejected proposal of Walter, and I like 
this one even more. Good luck with the remaining work!




More information about the Digitalmars-d mailing list