4 ms·
stdint.h was a huge improvement. But uint8_t is kind of ugly compared to "byte". I personally use : byte u16 u32 u64 i32 etc. and u32x4 f32x4 for vectorized/
by stephc_int13 4y ago
stdint.h was a huge improvement. But uint8_t is kind of ugly compared to "byte".
I personally use :
byte
u16 u32 u64 i32 etc. and u32x4 f32x4 for vectorized/simd types
Not perfect but a good-enough compromise that would not take long to understand for anyone reading my code.
- kabdib 4y agoI'm wading through a sea of third party projects right now that variously use uint8_t, u8, byte, tchar, BYTE, and endless variations that prepend one or two underscores for no apparent reason other than simple paranoia. Now, on to other types: Care to guess how many bits WORD is? (Trick question: It depends on the project you're in. You can imagine the adaptation layers when someone thinks that a bool is 32 bits). It's even more fun when they #define these types, rather than use typedef or "using". ("Remember, children, every time you use #define, God kills a startup"). These types don't make things safer, or in any way better. They are long-term damage. For the love of Schmoo, use the standards, I'm losing my hair.