42 ms·
Conceptually, void is a singleton type: it has one value. So a function which returns void does return, just without anything useful. Bottom has no value, so a
by masklinn 6y ago
Conceptually, void is a singleton type: it has one value. So a function which returns void does return, just without anything useful.
Bottom has no value, so a function which “returns” bottom can not terminate.
Practically, this means it either loops forever or “breaks” e.g. panics or exits the program.