develooper Front page | perl.perl5.porters | Postings from August 2010

Re: [perl #76756] PATCH: srand returns the seed

Thread Previous | Thread Next
Ben Morrow
August 2, 2010 11:40
Re: [perl #76756] PATCH: srand returns the seed
Message ID:
Quoth ("Jan Dubois"):
> 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?

There is a third option:

    c) Add "-0" to the list of strings that are FALSE.

(And, of course, arrange for "-0" to consistently numify as -0.0, if it 
doesn't already.)

This would only be a sane thing to do if we intend to make -0.0 consistently
useful. If the sign disappears (or reappears) under unpredicatble
circumstances, there's no point preserving it in the stringification
(that is, option (b)).


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About