Bottom Type--Type Theory

Neia Neutuladh neia at ikeran.org
Thu Jan 17 22:23:11 UTC 2019


On Thu, 17 Jan 2019 22:56:00 +0100, Johannes Loher wrote:
> There are quite a few languages which allow declaration of variables of
> their bottom type in the manner I described. These include:
> - Rust
> - Kotlin
> - Flow
> - Haskell
> - Swift
> 
> On the other hand, I don't know of any language which prevents this. Do
> you know any?

C and C++ don't care if you use something before initializing it. Most 
languages explicitly forbid it, and Haskell particularly doesn't let you 
declare something before initializing it. So in order to use a variable of 
the bottom type, you must first assign it somehow. That means calling a 
function that returns the bottom type.


More information about the Digitalmars-d mailing list