DIP 1017--Add Bottom Type--Final Review
Dukc
ajieskola at gmail.com
Wed Jan 16 23:04:39 UTC 2019
On Wednesday, 16 January 2019 at 18:52:17 UTC, Johannes Loher
wrote:
> No, I actually meant it exactly as I wrote it. The reasoning is
> the following: If we were to make `void` a proper unit type, it
> needs to be a type with exactly one value. We could choose any
> type we want for this, as long as it only has one value. E.g.
> `struct A {}` could be a candidate for such a type as any two
> instances of it are equal. However, `Tbottom*` is also a type
> with only one value: `null`. To me it seemed like the canonical
> choice for defining `void`.
An interesting find! I cannot immediately see any good argument
against it. Deserves a closer look IMO.
More information about the Digitalmars-d
mailing list