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.
[ Parent
| on HN ]
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)
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.