by niklasgray · 6y ago · 0 comments
In retrospect, I think I was wrong and that "unsigned as default" works better.
I think the domain is important here. We're building a game engine, so there's actually plenty of bit fiddling. We also make use of the "overflow wraparound" of unsigneds in a lot of places.
I think in our case having 99 % unsigned is more feasible than having 99 % signed. There are actually not many things that we would need to use a signed integer for.
FYI, in our codebase right now we have
10038 uint32_t 123 int32_t 7843 uint64_t 58 int64_t
So at the moment we're actually 98.998 % unsigned.
I know it's not 99 %, but it's pretty close :)