develooper Front page | perl.perl5.porters | Postings from July 2012

Re: [PATCH] v5: fix blead usage of OK flags vs. all magic

Thread Previous | Thread Next
From:
Reverend Chip
Date:
July 1, 2012 16:28
Subject:
Re: [PATCH] v5: fix blead usage of OK flags vs. all magic
Message ID:
4FF0DD30.6000003@gmail.com
Saving questions of style for later:

On 7/1/2012 1:35 PM, Father Chrysostomos wrote:
>>> Youch!  Did you really have to remove the if(SvTHINKFIRST) block?
> You didn’t answer that question.

Sorry, here goes:

Mostly this seems like an unworthy question.  If removing code breaks
it, then I have a bug, and testing shows no bug.  If removing code
doesn't break it, then I have performed a service by removing dead
wood.  Entropy is our enemy, and I've pushed back against it.

In this particular case: SvTHINKFIRST is a bit of a weird bundle. 
"Think first"?  Think first before what?  Why only
(SVf_READONLY|SVf_ROK|SVf_FAKE), but not any of the MAGIC e.g.?  Never
made much sense to me, perhaps merely due to ignorance.  In any case,
sv_copysv is a place of keep knowledge where secrets are uncovered and
black boxes are opened.  I found THINKFIRST of little value, but not
none.  Thus:

-    } else if (SvTHINKFIRST(sv)) {
[...]
+    if (SvTHINKFIRST(sv)) {


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