Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: triple negation - an idiom?

by QM (Parson)
on Dec 08, 2014 at 11:00 UTC ( [id://1109547]=note: print w/replies, xml ) Need Help??


in reply to triple negation - an idiom?

Update: clarified for boolean...

Considering the previous responses, I'll throw my 2p in.

I prefer the named operators, such as not to !, because they don't disappear as easily into the punctuation forest that Perl sometimes turns into.

(Which makes me think that not not would be the named unary positive operator for booleans, just like + is the positive sign operator. Maybe a nice alias like aye instead?)

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re^2: triple negation - an idiom?
by tobyink (Canon) on Dec 08, 2014 at 12:56 UTC

    No, not not can't be used as a non-punctuation equivalent to the unary +.

    not not 2 is equal to 1.

      Yes, agreed. I was thinking of Booleans, where it's not an issue. Though my telepathy is in the shop this week.

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found