Bottom Type--Type Theory

Jonathan Marler johnnymarler at gmail.com
Thu Jan 17 00:41:54 UTC 2019


On Thursday, 17 January 2019 at 00:09:50 UTC, H. S. Teoh wrote:
> On Wed, Jan 16, 2019 at 02:32:33PM -0800, Walter Bright via 
> Digitalmars-d wrote: [...]
>> [...]
> [...]
>
> Actually, the *real* problem with `void` is that it has been 
> overloaded to mean multiple, context-dependent things that are 
> somewhat but not really the same, and aren't really compatible 
> with each other.
>
> [...]

A good summary of the issues with void. Maybe adding a bottom 
type enables some new clever semantics, but I would venture to 
guess that adding a real unit type would be even more helpful 
than a bottom type. I've had cases where being able to use void 
as a function parameter or a field would have made some of my 
templates much cleaner. Maybe we should focus on making void a 
real unit type before we try to add a bottom type?


More information about the Digitalmars-d mailing list