Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As someone else describes, void is the "uninhabited" type, i.e.: it cannot be created. Void is a way of indicating the absence of valid output.

I think null is wrong too, because it references the fact that in most languages, types are a sum type of "all possible valid inputs" plus "null". Rust avoids null and has no null pointers unless you use unsafe code.

Unit means "there is precisely one instance of this type". It is the unitary type.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: