On Dec 15, 2006, at 10:22 PM, Matisse Enzer wrote:
On Dec 15, 2006, at 7:52 AM, Chris Dolan wrote:
That can't be right. Negation does not contribute to complexity.
I think it is fair to say, that to a human, negation *can* increase
complexity:
if ( $foo ) {
# do something
}
On Dec 15, 2006, at 7:52 AM, Chris Dolan wrote:
That can't be right. Negation does not contribute to complexity.
Instead, I believe it is the for loop and the exit points that are
increasing your count. Consider rewriting the for as ifs and gotos:
sub complexity_of_six {
my
On Dec 15, 2006, at 7:52 AM, Chris Dolan wrote:
That can't be right. Negation does not contribute to complexity.
I think it is fair to say, that to a human, negation *can* increase
complexity:
if ( $foo ) {
# do something
}
is a little bit easier to understand than:
if
Chris Dolan wrote:
> That can't be right. Negation does not contribute to complexity.
> Instead, I believe it is the for loop and the exit points that are
> increasing your count. Consider rewriting the for as ifs and gotos:
>
>sub complexity_of_six {
>my $bar = shift;
>my $
On Dec 14, 2006, at 11:20 PM, Matisse Enzer wrote:
On Dec 14, 2006, at 3:05 PM, Michael G Schwern wrote:
Matisse Enzer wrote:
sub complexity_of_six {
my $bar = shift;
my $total = 0;
my $type = ref $bar;
if ( ! $type ) {
$total = $bar;
}