Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^8: Burned by precedence rules (eqv)

by TimToady (Parson)
on Dec 31, 2008 at 03:17 UTC ( #733392=note: print w/ replies, xml ) Need Help??

in reply to Re^7: Burned by precedence rules (eqv)
in thread Burned by precedence rules

Well, we can't use eqv because we already use that for something else, but we do have a Boolean not-equal already:

$x ?^ $y
What we don't have is a Boolean equal. I thought about adding:
$x ?= $y
but people would probably think that means:
$x = $x ? $y;
which is nonsense, but they'd still think it. :-)

Anyway, the utility is not worth the extra complexity, in my opinion. Comparing two Booleans for equivalence is an odd enough thing to do that I don't mind if it looks a little odd.

Comment on Re^8: Burned by precedence rules (eqv)
Select or Download Code
Replies are listed 'Best First'.
Re^9: Burned by precedence rules (eqv)
by tilly (Archbishop) on Dec 31, 2008 at 03:58 UTC
    What about saying that !( potential boolean operator ) means the boolean negation of the boolean operator? That would naturally give you the logical operators !&& (nand), !|| (nor) and !^ (not xor). The last would, of course, be Boolean equals.

    (I can't believe I just suggested that.)

Re^9: Burned by precedence rules (eqv)
by tye (Sage) on Dec 31, 2008 at 03:47 UTC

    Note that I did include a winky smiley. But I saved the clincher argument for now: Perl 6 is becoming so like VB, it will be very surprising to VBers when the purpose of eqv is so different. :-D

    - tye        

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2015-11-27 00:33 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (710 votes), past polls