I see and work with a lot of software, written by a fairly large group of people. LOTS of times, I see integer type declarations as wrong. Two examples I see most often: creating a regular signed integer when there can be no negative numbers. The second is that often the size of the integer is declared as a full 32 bit word when much smaller would do the trick. I wonder if the second has to do with compiler word alignment lining up to the nearest 32 bits but I'm not sure if this is true in most cases.
When you create a number, do you usually create it with the size in mind, or just create whatever is the default "int"?
Using signed 32 bit int "just works" in all of these cases:
It's an easy choice to make. Picking any other integer type would take consideration that most people don't want to take the time to make. Standardizing on a common integer type makes everybody's life a bit easier. Most 3rd party libraries default to using signed 32-bit integers, so choosing to use other integer types would be a hassle from a casting/converting stand-point.