Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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.


In reply to Re^5: Looking for discussions of "block after or" syntax error by Laurent_R
in thread Looking for discussions of "block after or" syntax error by wsanders

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (2)
    As of 2018-07-20 04:36 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















      Results (424 votes). Check out past polls.

      Notices?