develooper Front page | perl.perl6.language | Postings from May 2001

Re: Damian Conway's Exegesis 2

Thread Previous | Thread Next
From:
Damian Conway
Date:
May 15, 2001 18:17
Subject:
Re: Damian Conway's Exegesis 2
Message ID:
200105160117.LAA12445@indy05.csse.monash.edu.au
Bryan C. Warnock sniped:

   > >    > Okay, this part has me confused.
   > >
   > > And rightly so: it was a screw-up. I lost track of whether I was keeping
   > > the property on the value or on the node reference and ended up doing
   > > both.
   > 
   > What?  You didn't test it before you posted it?  For shame!   ;-)

Of course, I tested it! As I explained:

        Interestingly, the code still *worked* since the (originally
        unset) property on the node reference would have returned
        C<undef> which would undergo the usual boolean conversion in the
        C<if>, and the usual promotion to zero in the numerical context
        of the increment.

The point is that (as in Perl 5) neither of these two cases of undef
promotion trigger a warning, so there was nothing to alert me to the
fact that the initialization of the value was redundant!

;-)

Damian

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About