Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
For the reasons above, don't agree about your position. But I submit that the example you mention refers to the intelligent use of idiom and not the general case that is conjured up by your suggestion that Perl programmers should be considered illiterate unless they can perfectly apply the precedence tables in all situations, and that they should always want to do so to the fullest possible extent (a canard).

Perl is all about using (private) idiom to match personal style and increase efficiency. So in that sense I agree, example 3 seems easier to understand (to me). I think I've probably used all three examples in similar situations depending on how I thought about the problem, which is the point.

But the other two examples would be fine too if separated by whitespace/linefeeds, depending on temperament. This is a question not of how well someone knows precedence but about personal style. I am not sure that your personal style depends more on precedence rules than some other people here.

That said, I lost faith in the infallibility of precedence rules when I heard they were going to be "redefined". Maybe there is a fine (subjective) line between common knowledge and the esoteric in this case but as you can see from the comments everyone comes at Perl from a different angle and often there are good reasons for not exploiting that knowledge.

In reply to Re: Operator Precedence by mattr
in thread Operator Precedence by tomazos

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2023-03-26 20:43 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.