|
|
|
|
|
by sixfiveotwo
701 days ago
|
|
> void is the unit type. The fact that it is not constructible is a wart of the language, inherited from C.
> A function returning bottom cannot return, yet void foo() {} can. Or you could say it the other way, that it is the bottom type, and the fact that it can be used as the unit type for returned values is a wart of the language. Furthermore, void* isn't a pointer of the unit type, it's a type for pointers to undefined/unspecified value types. |
|