http://qs1969.pair.com?node_id=1134411


in reply to The mystery of double bitwise negation

I'd say that the first one was completely pointless. Double bit-wise inversion of the constant 1 serves no purpose at all:

C:\test>perl -MDevel::Peek -le" my($m,$n) = (1,~~1); print Dump($m), ' + ', Dump( $n )" SV = IV(0x2ca374) at 0x15501c REFCNT = 1 FLAGS = (PADBUSY,PADMY,IOK,pIOK) IV = 1 SV = IV(0x2ca378) at 0x155010 REFCNT = 1 FLAGS = (PADBUSY,PADMY,IOK,pIOK) IV = 1

The second is a golfed version of scalar. Why? No idea.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!