Even Swift who’s mantra is do nothing unexpected or implicit has a machine dependent (word sized) Int type.
Re:Go 2, here we come
by the_clarence on Thursday November 29, 2018 @04:19PM
(#18564115)
You’re trading off security here. Users are going to shoot themselves in the foot assuming that int is this size or this size.
My main issues with it are:
1. Like many other performance optimizations, it is a trade-off. You may be sacrificing easy maintenance or even introducing breakage (if the person using it doesn't understand the limitations and implications). So IMHO you should only do it if you can show through profiling, etc. that the gain is real and worth it.
2. As a matter of language ergonomics, it should never be something that anyone does unknowingly. You should have to explicitly ask for it. The type name should be something blindingly obviously like "native_int" or "word_int".