News for hackers. Stuff that matters.
Re:A Special Kind of Hell: intmax_t in C and C++ by oofabz on Saturday December 05, 2020 @04:10PM (#25318396)
>only fixed-size types

I agree that intmax is silly, but I believe there are legitimate uses for variable-size types, like int_fast8_t and uint_fast16_t. These are their nominal size on x86 because the architecture has arithmetic operations for those sizes. But on POWER, they are both 32-bit types, because there are no 8-bit or 16-bit opcodes, and emulating overflow behavior with bitmasks incurs a performance hit.

Re:A Special Kind of Hell: intmax_t in C and C++ by forrestthewoods on Saturday December 05, 2020 @04:32PM (#25318597)
Implementing this has the language level has proven to be a total disaster.

The number of cases where it’s important to use different types on different architectures exists, but is very small.

That’s something that would be much easier to handle at the library-level for a finite set of architectures than at the language level for all archs.

I’d also like to see the elimination of printf specifiers. Another total disaster and source of soooooo many bugs. Especially with all of these variable types.