Re:My personal C coding style as of late 2023
by Nursie on Monday October 09, 2023 @08:49AM
(#37819913)
As recently as eight years ago, on projects started within the previous handful of years. It’s more to do with a lot of C programmers being stuck in a sort of stasis IMHO. (I’m sure I was too in many ways).
And yes, Microsoft were the outlier and absolutely dragged their heels on stdint, but you could always grab a compliant implementation from one of the FOSS projects that produced one.
Re:My personal C coding style as of late 2023
by uxp8u61q on Monday October 09, 2023 @08:54AM
(#37819965)
inttypes.h was added to C99. A quarter of a century ago.
Re:My personal C coding style as of late 2023
by yakubin on Monday October 09, 2023 @09:31AM
(#37820291)
Many C codebases predate that. And Visual Studio for a long time didn’t support anything newer than C89.
Re:My personal C coding style as of late 2023
by eqvinox on Monday October 09, 2023 @11:32AM
(#37821479)
There's no requirement for a born-1995 codebase to still build on a 1995 system in 2023.
I work on a born-1995 codebase. We started requiring an ISO C11 plus GNU extensions¹ several years ago and are actively removing "compatibility" checks and kludges that are outdated.
[¹ to be fair - not needing to support Windows is a godsend for any C project.]
How many of them started before stdint.h existed? AFAIK, it's a somewhat recent addition to the C language, and IIRC, for a long time even after it became part of the C standard, some popular C compilers still didn't have it.