2 ms·
> I imagine that applications with less addressing space also have less of every other resource, and can count less of everything. That's a fair point, and I'v
by nextaccountic 4y ago
> I imagine that applications with less addressing space also have less of every other resource, and can count less of everything.
That's a fair point, and I've seen here on HN a design approach that everything should have a limit (because programs often explode in unexpected ways, such as degraded performance, when operating outside the programmer's expectations)
But, usize doesn't necessarily capture the right limit, so.. I'm not sure
- marcosdumay 4y agoWell, yes. I favor your program blowing up on integer overflow too, so it's very predictable how it behaves. And if it's not overflow that is the concern here, well, it's not solved by going with another type either. Almost all the time, usize has a convenient limit that is much larger than needed. On the few exceptions, yes, you have to design your types and deal with type conversions.