Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: One out of three ain't bad (order)

by mrborisguy (Hermit)
on Oct 24, 2005 at 04:51 UTC ( [id://502375]=note: print w/replies, xml ) Need Help??


in reply to Re^2: One out of three ain't bad (order)
in thread One out of three ain't bad

Which seems to work right now, since you've seen the progression of what came before. But in 2 months, I can imagine you thinking, "Now why in the world is there a two in there... I must want two of them to be true" on your first look while skimming your code.

    -Bryan

  • Comment on Re^3: One out of three ain't bad (order)

Replies are listed 'Best First'.
Re^4: One out of three ain't bad (order)
by Dr. Mu (Hermit) on Oct 24, 2005 at 17:23 UTC
    True enough. I suppose what's lacking is a commonly-accepted idiom for Boolean conversions. We have 0+ for numeric conversions; so perhaps !! wasn't so bad after all, even though two operations are implied (unless the compiler optimizes them out). 0|| and 1&& would also work.

      No, 0||$x is just $x, not "Booleanized" $x. perl -le"print 0||5" prints 5 not 1 and perl -le"print 1&&@ARGV" x y z prints xyz.

      - tye        

        So, once again in Perl,
        $conjecture->obviously_so == 1 && $conjecture->true == 0
        Thanks, tye, for testing something I should've! (tho' the logic of Boolean diadics not returning Boolean values escapes me...)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://502375]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found