4 ms·
I'd prefer if it were more letters. It bothers me when API designers omit random letters just to save a few keystrokes. These are particularly egregious because
by ludocode 4y ago
I'd prefer if it were more letters. It bothers me when API designers omit random letters just to save a few keystrokes. These are particularly egregious because I keep forgetting which letters they kept. Is it "chk"? or "ckd"? or "chd"? or something else?
I wrote a portability library that wraps these with compiler intrinsic and standard C fallbacks. I chose to spell out the full word in addition to making the type explicit. It's a lot more verbose of course but a lot clearer to read:
https://github.com/ludocode/ghost/blob/develop/include/ghost/math/checked_add/ghost_checked_add_i32.h https://github.com/ludocode/ghost/blob/develop/include/ghost...
- goatlover 4y agoA saner language would handle the conversion for you so it would work with just the normal math operators.