[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-debug-dev] So many if() statements in CDT source code
|
Idle thoughts...
I'm always baffled by the sheer number of if() statements in CDT code.
As the number of if() statements skyrockets, testing becomes a near
impossible problem.
This is a return to a subject I've raised earlier, but when I look at
the sort of bugs I see in CDT, I can't help to think that this is an
important issue.
Shooting from the hip here: could increased use of polymorphism help to
reduce the number of if() statements?
E.g. create "empty" objects instead of comparing against null pointers.
Has any attempts been made at systematically categorizing the types of
if() statements in CDT to figure out if there are any suitable
strategies to reduce the number of if() statements?
Oh. I'm hereby reversing the burdon of proof that there too many if()
statements in CDT. Those that think that the number of if() statements
in CDT is not a problem won't read this far anyway. :-)
--
Øyvind Harboe
http://www.zylin.com