3 ms·
Interesting. Arguably tho this shows how C is aging. I find that PRIx32 a bit ugly. Although I just had a (logging) use case in go where I missed cpp macros -
by lanstin 5y ago
Interesting. Arguably tho this shows how C is aging. I find that PRIx32 a bit ugly.
Although I just had a (logging) use case in go where I missed cpp macros - wanted the log statement to get something from the file and just had to pass it in as another parameter.
- kazinator 5y agoI have also never used PRI-anything. It's a crime against readability. If I have a uint32_t which needs printing I cast it to (unsigned long) and use %lu or %lx. This requires more typing in the argument list, but keeps the format string tidy. It's important for the format string to be tidy, because that's the reason of its existence: to clearly and concisely convey the shape of what is being printed.