You honestly believe that having different meanings for parens versus brackets is inherently a "trap"? You must be using some kind of really bizarroid font, if they're not easily visually distinguishable. Where I sit, ( and [ look as different as i and |. I really think the problem you ran into has a lot more to do with expectations you brought back from Python. Comma and semicolon, or comma and period, have different meanings as well. Is *that* a problem? (No, I don't mean the scalar comma operator; that's a problem for a different reason, because people expect the other comma operator's semantics, not because anyone confuses it with the period.)

You admitted in your original post that you had been using a language that assigns one semantic to the brackets, then switched back to Perl, which assigns them a rather different semantic, and got caught expecting the semantic you would have had in Python. I posit that this is exactly the sort of scenerio where Perl's use of brackets will trip anyone up: when you expect them to have a different semantic, one that was assigned to them in another language you've been using. Do you know anyone who was tripped up by this in any *other* circumstance?

As far as "subtle but important" semantic differences, I can only say that calling the difference between an array and a reference to an array "subtle" is like calling the difference between a bibliographic entry and the corresponding book subtle. The concept of references is absolutely crucial, one of the very basic fundamentals of computer programming, right up there with flow control IMO; if it seems subtle to you, you're going to have much larger problems than confusing parens and brackets.


"In adjectives, with the addition of inflectional endings, a changeable long vowel (Qamets or Tsere) in an open, propretonic syllable will reduce to Vocal Shewa. This type of change occurs when the open, pretonic syllable of the masculine singular adjective becomes propretonic with the addition of inflectional endings."  — Pratico & Van Pelt, BBHG, p68

In reply to Re: Some Insights from a Traveler Between Languages by jonadab
in thread Some Insights from a Traveler Between Languages by skyknight

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.