This node started as answer to difference between ($scalar) and $scalar, but I realized I do not offer answers, so I better put it here - as my first meditation...

After programming many years in languages where () were used only to define expression precedence and to pack together parameters of the function, I started to learn "programming perl", where () are used also to show list context. From being used to spread () freely around and inside expressions, I became sometimes kind of paranoid and saving some calculation steps in temporary scalar variables just to make sure they are scalars (it laso helps for debugging to print them...) IMHO () and comma opperator might be rather frustrating feature for programmers experienced in other languages - at least for me. I know it is not going to happen, but for Perl6 I would like to have () for expression precedence as in most other languages, and for simple showing list context some other operator, like [ ] or something.

Does anybody here knows why this confusing decision was made? Does it have some deep reason, what I am missing now? I can understand that list of parameters of the function I want to wrap into () as in other languages, but free-standing list - it feels for me little different.

I have nothing for perl only praise, I like Perl a lot, I coded in many other languages and each of them has some annoying features. Perl is clearly balanced into positive side, but still...What is your opinion/feelings (except stuff already written in other meditations to this theme..;) )?

pmas
To make errors is human. But to make million errors per second, you need a computer.


In reply to List context, expression precedence, and () by pmas

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, details, 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, summary, 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.