3 ms·
Yeah, I really don't understand why people use signed integers so often. They seem... quirky. Especially in C where signed overflow is UB. I guess they're synta
by nicoburns 3y ago
Yeah, I really don't understand why people use signed integers so often. They seem... quirky. Especially in C where signed overflow is UB. I guess they're syntactically the default.
Would you consider the fixed width integer types (uint8_t, etc) a recent C feature worth using? The older type's size being implementation defined seems like a major pain to me, but I haven't used C much.
- G4E 3y agostdint.h defining the fixed width integer is part of C99. I wouldn't call that recent ! https://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdint.h.html https://pubs.opengroup.org/onlinepubs/009695399/basedefs/std...
- __d 3y agoYou need to understand the timescales of C. C89 (aka ANSI C) was "standard" C for years. C99 was released, and largely ignored until the mid-2000's, and then gradually began to grow. As of about 2015, C99 was probably the "standard" C dialect, but there is still a lot of C89 out there, especially where you have niche toolchains. I wouldn't seriously consider C11 unless you're certain that the toolchain supports it, and there's some feature that you really need. And that's pretty unlikely.
- gavinhoward 3y agoYes, fixed-width integer sizes are absolutely worth using.