[lug] can't make this stuff up, folks... My 2 lines of code, errr, I mean, my 2 cents....

Zan Lynx zlynx at acm.org
Fri Oct 23 10:43:42 MDT 2009


On 10/23/09 10:22 AM, George Sexton wrote:
> I’ll throw in my thoughts. Code would be much more robust if programmers
> actually checked for error results coming out of their code and then
> handled it.

This is the #1 reason I love exceptions. Sure, it is possible to catch 
and discard all the exceptions but it takes an act of will to do so. 
With error return values it takes programmer action in order to check them.

Compiler flags to force return value handling help with this but make 
the code really noisy.

(void)printf("..."); // Just looks messy.

-- 
Zan Lynx
zlynx at acm.org

"Knowledge is Power.  Power Corrupts.  Study Hard.  Be Evil."



More information about the LUG mailing list