So for what it’s worth, my preferences are:
First of all, for any names other than
Second of all, within that, for names which put the emphasis on the “integer” half of things, rather than on the “pointer” (or whatever) half;
And within that, for
uintp in particular. I like it for essentially the same reasons that others gave for liking
uptr: it’s simple and precise. It does still carry some of the same hazard as those did (and which I raised as an objection to them), that people may interpret it as “pointer to int”, or something of that nature. This is a subjective judgment call, but I personally feel that with these names it is now low enough, and that the ‘p’ is more clearly just a modifier on the ‘int’. This also cleanly allows for adding e.g.
uintr for register-sized integers, or whatever, in the future.
A close second are
uintx; and out of the remainder, I like
usize. The only ones I actively dislike are
ux, which I feel are too cryptic. (Still better than
uint, but now only a lesser evil.)
As far as the “consistency” argument goes, I think that one way to think about it is that all of the names “start out” as
uint32, etc.; and then we notice that these can be abbreviated to just
u32, etc., without significant loss of clarity, because of the implicit separator between the “letters part” and the “numbers part”, which makes it clear that it should be read as a “u” and a “32”, which can then reasonably be intuited to mean “unsigned” and “32 bits”. On the other hand, for
uintx, this doesn’t work, because in
up, it’s not clear that the letters are supposed to be taken separately, as “i” and “x”, rather than as a single, indivisible word. Intuiting that “ux” means “unsigned” and “variable bits” takes quite a leap of imagination.