On Mon, 02 Aug 2010, Zefram wrote: > > Nicholas Clark wrote: > >And so we go full circle, as you removed the code demonstrating that we > >already have that bug, only worse: > > Yes. We should fix that bug, not do it intentionally. I don't see agreement on what the bug is anymore: a) Should -0 always be TRUE, even when it has never been stringified, or b) Should -0 always be stringified as "0" and therefore always be FALSE? I can see arguments for both, as neither of them is completely "correct" from at least some points of view. I would tend to prefer b), given that it is really easy to lose that minus sign on your zero anyways: $ perl -MDevel::Peek -e '$a = "-0"; $b = $a + 1.0; Dump $a' SV = PVIV(0x820204) at 0x825df0 REFCNT = 1 FLAGS = (IOK,POK,pIOK,pPOK) IV = 0 PV = 0x201b80 "-0"\0 CUR = 2 LEN = 16 $ perl -MDevel::Peek -e '$a = "-0"; $b = $a + 1.1; Dump $a' SV = PVNV(0x802bac) at 0x825df0 REFCNT = 1 FLAGS = (NOK,POK,pNOK,pPOK) IV = 0 NV = -0 PV = 0x201b80 "-0"\0 CUR = 2 LEN = 16 But I guess you can view this as just another bug. Cheers, -JanThread Previous | Thread Next