4 ms·
tialaramex got it wrong even at the type theory level, a size of 0 is the wrong focus, the number of elements, 1, should have been the focus.
by horseduck 19d ago
tialaramex got it wrong even at the type theory level, a size of 0 is the wrong focus, the number of elements, 1, should have been the focus.
- kibwen 19d agoI wouldn't say they got it wrong exactly. Uninhabited types aren't equivalent to unit types, but in terms of Rust they're both classified as zero-size, and I suspect they were just pointing out that Rust has optimized and special-cased zero-sized types accordingly since time immemorial.