DIP 1017--Add Bottom Type--Final Review

FeepingCreature feepingcreature at gmail.com
Thu Jan 17 08:27:36 UTC 2019


On Wednesday, 16 January 2019 at 08:47:48 UTC, Johannes Loher 
wrote:
> By the way, Kotlin does basically the same thing. Kotlin does 
> not have pointers, but it has optional types and the type 
> `Nothing?` is a type which can hold exactly one value: `null`. 
> This also means that it is basically a unit type. While it is 
> not actually Kotlin's `Unit` type, it could have been. 
> Similarly, should we decide to go down that road and add proper 
> top, bottom and unit types, we could define
>
> ```
> alias Tbottom = typeof(assert(0));
> alias void = Tbottom*;
> ```

That is amazing. I love it.


More information about the Digitalmars-d mailing list