News for hackers. Stuff that matters.
Re:Sizeof(char) is 1 by fauigerzigerk on Monday September 06, 2010 @07:39AM (#1666457)
The only reason to do that is if you want the compiler to check for typos: HTPP is caught, "htpp" isn't. It makes no sense for single letter constants of course.
Re:Sizeof(char) is 1 by riffraff on Monday September 06, 2010 @08:32AM (#1666518)
and to avoid silly warnings from some static analysis software (e.g. findbugs telling you you are repeating a hardcoded string N times and you could use a constant)
Re:Sizeof(char) is 1 by arethuza on Monday September 06, 2010 @08:05AM (#1666489)
Isn't that what unit testing is for?
Re:Sizeof(char) is 1 by loewenskind on Monday September 06, 2010 @09:02AM (#1666557)
Do all your projects get 100% branch coverage? If not you'll probably want the compiler to help you where ever it can.