Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^5: Looking for discussions of "block after or" syntax error

by Laurent_R (Monsignor)
on May 01, 2013 at 22:31 UTC ( #1031664=note: print w/ replies, xml ) Need Help??

in reply to Re^4: Looking for discussions of "block after or" syntax error
in thread Looking for discussions of "block after or" syntax error

Well, you are not "knowing" you are "guessing"... ... and that's not a good base for designing code.

This is unfair, Rolf. I am certainly not claiming to be an expert on the subject, this is why I am saying I may be wrong. But, please, don't say that I am just guessing, I have done a quite a little bit more work than just guessing. I am just admitting that I might be completely wrong, if such is the case, please show me why, and I will be happy to recognize it.

What's worse, I also guessed that and and or have the same precedence ...

Well, I knew they did not have the same precedence. But my point is that this is probably essentially irrelevant.

... but now take a look what B::Deparse says: ...

$a and $b or $c

What I am saying: true, i.e. $a and $b, if they are both true, otherwise, $c. Exactly equivalent to $c unless $a and $b;

$a or $b and $c

True if $a is true. Otherwise, true only if $b and $c are both true. Again, it seems to me that this is exactly equivalent to $b and $c unless $a;

In brief, the two deparse examples that you have shown confirm exactly and precisely by left-to-right Boolean interpretation with short-circuit that I made.

Again, I am being very careful on this, I may be completely wrong. But, *please*, don't use this uncertainty to claim that I am just guessing.

Comment on Re^5: Looking for discussions of "block after or" syntax error
Replies are listed 'Best First'.
Re^6: Looking for discussions of "block after or" syntax error
by LanX (Chancellor) on May 01, 2013 at 22:42 UTC
    ehm ... sorry if you conceive this as an unfair attack.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2015-11-28 23:41 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 (746 votes), past polls