Feedback Thread: DIP 1034--Add a Bottom Type (reboot)--Final Review
jared771 at gmail.com
Tue Sep 22 18:11:56 UTC 2020
On Tuesday, 22 September 2020 at 17:24:02 UTC, Paul Backus wrote:
> On Tuesday, 22 September 2020 at 12:17:09 UTC, Mike Parker
>> This is the feedback thread for the Final Review of DIP 1034,
>> "Add a Bottom Type (reboot)".
> From the DIP:
>> * A union has the size of the largest member. Adding a
>> noreturn field to a union never increases the size, so its
>> size is 0.
> Currently, all structs and unions must have .init values that
> are computable at compile time, which means that adding a
> noreturn field would have to be a compile-time error, since it
> makes the .init value impossible to compute. You should
> probably specify in the section about `noreturn.init` than any
> aggregate with a noreturn field also has no .init value.
We could also make noreturn.sizeof == 1, like with void. As for
noreturn.init, it should be equivalent to assert(0) IMO, although
that contradicts the rule that it's *accessing* a noreturn value,
not creating it, that aborts the program.
More information about the Digitalmars-d