Bottom Type--Type Theory

Olivier FAURE couteaubleu at gmail.com
Thu Jan 17 18:47:33 UTC 2019


On Thursday, 17 January 2019 at 18:38:54 UTC, Olivier FAURE wrote:
> For instance, I think it would make sense to call a function 
> `int foobar(void, void)` with as `foobar(1, "abd")`, which is 
> basically the function saying it will ignore these parameters.

To expand on this, I'm understanding supertyping (at least in D 
and similar languages) as the *discarding* of type information. 
Eg, A is the supertype of B if B has more specific information 
about what values it can hold than A, which means A can accept 
more different values.

In that mindset, void seems like the logical top type, because it 
describes no information at all about any value it could hold.


More information about the Digitalmars-d mailing list