On Dec 19, 2006, at 2:43 PM, Matisse Enzer wrote:
I agree that ( $a == $b ) is not an extra branch, but, it is
harder for a human to understand than
( $a )
When did this thread change from code complexity to human
understandability? Those are rather different topics.
( $a ) of course translates to ( defined $a && $a ne '' && $a ne
'0' ) which is likely harder to understand than ( $a == $b ).
Undoubtably, the former leads to more subtle bugs than the latter.
I think that for true Cyclomatic Complexity ($a==$b) is the same as
($a) but there is some other thing going on with ($a == $b) that
perhaps, should be considered some other kind of complexity.
You're likely biting off more than you can chew. I recommend that
you take a lesson from Kwalitee and focus on implementing easily-
defined metrics first.
Chris
--
Chris Dolan, Software Developer, http://www.chrisdolan.net/
Public key: http://www.chrisdolan.net/public.key
vCard: http://www.chrisdolan.net/ChrisDolan.vcf