2021-04-12
Don't use fixed-width integers to detect a type's size
As a compiler developer, I see a lot of code that deals with data types and many different ways of using data types.
A problem that I have encountered a few times, despite being rather rare, is using fixed-width integer types to parameterize code on the size of types. When writing compilers or other programs that need to operate on data types directly, you often need code that behaves differently for different static types.
Read more