On 12.07.2017 03:50, Andrei Alexandrescu wrote:
On 7/11/17 4:29 AM, Timon Gehr wrote:
On 10.07.2017 18:23, Meta wrote:
...
problems with stuff like typeof(null)* etc. because for the most part
it's just a regular type, unlike Bottom.
Bottom is just a regular type.
Wouldn't the fact that it's a subtype of all other types make it a bit
more peculiar? -- Andrei
Every type is peculiar. That's essentially the point of having types.
There is not really a reason to invent a peculiarity ordering and then
add additional special casing for types deemed more peculiar. (I.e.,
creating different types of types based on an informal judgment of
peculiarity.)
In D, subtyping is messy anyway, as you cannot have a subtyping
relationship between values with different memory layout. Hence in D,
Bottom would not actually be a subtype of all other types.
In a very expressive type system, there are many more, functionally
different types that are uninhabited, not just Bottom.