Yeah, performance and the like are not my main concern, if you’re into that kind of micro-optimization you’ll probably won’t mind writing platform-dependent code to take advantage of the register sizes and available instruction set for instance.
It’s more about correctness and portabilty. In particular what bothers me is this broken promise of a “good enough” type to use as a default integer type without 2nd thought.
If we look at C the default types have varying width depending on the architecture. It makes it hard to write portable code but at least you know that when you’re using int you have a reasonably fast integer type, long might be bigger but slower, short is probably shorter etc… Basically you lose portability but might have better performance (and back when C was created it was probably very necessary, having a one-size-fits-all would probably have been completely intolerable).
That being said, any project that needed to be portable pre-C99 just ended up typedef’ing their own fixed width types in their config.h and C99 made stdint.h mandatory.
So giving a special status to 32bit integer seems like a lose-lose. You can’t tell the coder "int is generally fast" like C does and by hiding the fact that it’s really just a 32bit integer you take the risk that the coder won’t take the range into account while choosing which type to use.
Look at the snippet of code on the very homepage of the language: http://www.rust-lang.org/
Would you say that using int for the accumulator variable makes sense right now? Would it make more sense if int was i32 assuming that program is external input and not hardcoded? It’s still pretty broken, you should definitely check for overflow in a real world scenario.
Lastly, since it seems that churn was a concern (I’m not sure why, but still), changing the width of int would subtly change the behavior of many programs that used it while still allowing them to build. That dummy calculator code is one such example. Removing the type altogether would mean that all that code would break and need to be retyped which also has the advantage of forcing people to fix their code if they didn’t mean to use pointer-sized integers.