3 ms·
Usually I find something very objectionable in these C guides, but I like this one, and it's hit some of my favourite/most hated bugbears. In recent years it's
by Nursie 11y ago
Usually I find something very objectionable in these C guides, but I like this one, and it's hit some of my favourite/most hated bugbears. In recent years it's nearly driven me mad seeing people use the old types either directly or re-implementing their own equivalent of stdint.h, complete with all sorts of platform switching and other nonsense.
We've got these facilities, they're not exactly bleeding edge (the clue's in the name C99), let's use them!
- stromgo 11y agoThe document recommends "intptr_t" over "long" for system-dependent types, and I've considered doing this but I've been put off by the printing type of %"PRIdPTR" instead of %ld. I wonder if on modern platforms it'd be ok to use intptr_t and the printing type %zd (meant for ssize_t).
- Nursie 11y agoYeah I must admit the printing types are a bit ugly!