DIP 1017--Add Bottom Type--Final Review
Neia Neutuladh
neia at ikeran.org
Wed Jan 16 07:11:26 UTC 2019
On Tue, 15 Jan 2019 22:43:59 -0800, Walter Bright wrote:
> It reminds me of when we were coming up with a term for what became
> "immutable" types. People would say:
>
> Q: what does 'readonly' actually mean?
> A: readonly means immutable
> Q: ok, I get it
>
> Q: what does 'invariant' actually mean?
> A: invariant means immutable
> Q: ok, I get it
>
> Finally we realized we were being clubbed with a Clue-By-4. Just call it
> "immutable" and voila, haven't had comprehensibility problems with it
> since.
In this case, people will ask: "what does bottom_t mean?"
Some people will first look at Wikipedia and see:
> In type theory, a theory within mathematical logic, the bottom type is
> the type that has no values. It is also called the zero or empty type,
> and is sometimes denoted with falsum (⊥).
That, like many Wikipedia articles, clarifies nothing. They might read on
and see:
> In C, C++, Java, and Dart, the bottom type is void.
Which is wrong, and they'll wonder why the language has both bottom_t and
void, and then they'll ask here.
And then we'll answer: it means this function doesn't return. Which
suggests "NeverReturns" or some variation of that as the name of the type.
More information about the Digitalmars-d
mailing list