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

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

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

Either would be self-consistent, and thus make an improvement on the
bug.  Of the two options, I have a distinct preference for b, because
it adds the further consistency that any flavour of pure numeric zero
is consistently false.  Perl makes it difficult to predict which zero
you'll get, and using numeric values directly as truth values is common,
so this is a very useful thing to be consistent about.


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