Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I know that I am going to bump into it, over and over.

I don't experience it that way personally. (I've started using Perl 6 for some of my private scripting needs a few months ago, which doesn't give me a huge amount of experience with it, but at least a general feeling for the language.)

Once you internalize the rule that the paren has to immediately follow the identifier, you start looking at them differently – almost like they form a single token. And you really only need to think about it when writing a new function call, which is exactly when your brain is most likely to remind you of the syntax rules for function calls... ;)

OTOH the Perl 5 ambiguity that I demonstrated by example in my above answer, is something that I still run into every now and then even after many years of using Perl. Because at the time when you add the parens in such a situation, you're probably not thinking about function calls, but rather about the Perl features involved in extending the expression you're editing: in the example of extending $line to (" " x $n).$line, that would be the repetition operator and string concatenation.
It takes discipline to consciously pay attention to the fact that the expression which you're editing there is actually the first argument to a listop, and thus requires special care with parens – and if you're a human programmer, you're bound to sometimes overlook such things, resulting in a compiler warning in the best case, and an unnoticed bug in the worst.

That's my experience, at least... Other people's brains may work differently. :)


In reply to Re^3: Porting (old) code to something else [Perl 6 whitespace rules are not illogical!] by smls
in thread Porting (old) code to something else by Tux

Title:
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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found