3 ms·
the main numeric type is usize
by kiriakasis 8y ago
the main numeric type is usize
- steveklabnik 8y agoThat’s not correct, it’s i32. usize has a specific purpose: when you need a length of something in memory.
- shittyadmin 8y agoThe entire idea of a "main numeric type" is sort of silly - know what data you're dealing with and pick the length accordingly!
- steveklabnik 8y agoYeah, I only say "main" here because it's what you should pick if you're not sure.