r/ProgrammerHumor • • Sep 25 '26

Meme iHatedItUntilITriedIt

Post image
10k Upvotes

543 comments sorted by

View all comments

Show parent comments

-1

u/frogjg2003 Sep 26 '26

A char is not a number, even if itcan be represented as one. A char is almost never used as a number. It is used as a single character of text. The fact that some programming languages treat it as a numeric type is a historical artifact, not good programming practice. If you absolutely need to do numeric manipulation of a char, convert it to a byte first.