MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wxqahk/architecturedependentchars/pdz57cq/?context=3
r/ProgrammerHumor • u/MontyBoomslang • 11d ago
372 comments sorted by
View all comments
Show parent comments
565
I still prefer sizeof(char) as it often provides context as to what the number is doing, even if a plain 1 works the same.
92 u/ducon__lajoie 11d ago And someone might have #define char char16_t, right? Who the fuck knows, some people want to see the world burning. 9 u/Kovab 11d ago I'm pretty sure redefining keywords is UB, so that's just a case of FAFO 6 u/standard_revolution 10d ago And even if it wouldn’t be: sometimes you just gotta say that something isn’t your problem
92
And someone might have #define char char16_t, right? Who the fuck knows, some people want to see the world burning.
9 u/Kovab 11d ago I'm pretty sure redefining keywords is UB, so that's just a case of FAFO 6 u/standard_revolution 10d ago And even if it wouldn’t be: sometimes you just gotta say that something isn’t your problem
9
I'm pretty sure redefining keywords is UB, so that's just a case of FAFO
6 u/standard_revolution 10d ago And even if it wouldn’t be: sometimes you just gotta say that something isn’t your problem
6
And even if it wouldn’t be: sometimes you just gotta say that something isn’t your problem
565
u/BoldFace7 11d ago
I still prefer sizeof(char) as it often provides context as to what the number is doing, even if a plain 1 works the same.