Basically it’s a semantic question, you get a better idea of what you’re doing. So it says you’re choosing a size within a certain range. In fact it seems that they consider it useless and there is a proposal that is removed from the specification since the compilers decided not to adopt it, so don’t waste time with it.
There is even usefulness when different semantics make more sense, and in a certain way the size_t
may be replaced by a int
(not in all situations), and in fact in exercises and naive codes we see it all the time, but it’s not correct, it just works (in most cases). This type is created to handle a memory size and not just any number.
If programmers looked more at semantics of things the applications would be much better in every sense, including being better of maintenance.