3 ms·
That's the formal definition, and an interesting corollary with interesting consequences (from a typing perspective, a function of any return type can always op
by Ao7bei3s 7y ago
That's the formal definition, and an interesting corollary with interesting consequences (from a typing perspective, a function of any return type can always opt to halt instead of returning. note that in a lazily evaluated language like Haskell the caller can still continue, as long as it does not evaluate the result).
But I didn't go with that because it doesn't answer the question (is null the bottom type? no.), and in the context of return types (the main use case, though not the only) it's equivalent to what I said (no possible return value -> cannot return).