News for hackers. Stuff that matters.
Re:Sizeof(char) is 1 by zbanks on Monday September 06, 2010 @01:32AM (#1665974)
Is this really important? Sure, the source may be slightly polluted, but it's not going to slow down the application once it's compiled.

Really, these sort of things are probably good in code: they make it explicit that you are dealing with char's, and not some other datatype. If left out, it may look like a bug, causing debugging hassles.

Re:Sizeof(char) is 1 by chc on Monday September 06, 2010 @02:01AM (#1666024)
Agreed. I'm a strong proponent of lean codebases, but I still write `sizeof(char)`, because otherwise it's a dead ringer for a common mistake. Code should be concise only to the point that it doesn't become harder to read.
Re:Sizeof(char) is 1 by bnoordhuis on Monday September 06, 2010 @01:58AM (#1666020)
sizeof(char) is a flag. Not bad in itself but often found inside bad code.