My experience is similar. There are some things I have misunderstood in Perl and confused myself, but they are not the typical things, because my language background is atypical. I too started in BASIC, then later Inform (hence most of my ideas about OO) and subsequently elisp. (Ironically, I did not get my ideas about FP from elisp; I never understood FP in elisp but have picked it up (err, some of it) since I learned Perl.)

This is an important point in this thread, because it illustrates that what constitutes a "trap" utterly depends on what language you think in, what semantics you are used to. The first time I saw someone posting on here about the print($a+$b)*$c; trap, I thought he was out of his mind. I had no idea why he was multiplying the result of the print by a scalar in void context, or what it was he intended to accomplish by doing so, because I don't think in C. (I figured it out eventually, partly by looking at some of the answers to his question, but it was quite a surreal moment when I first looked at his code.) Is that a trap? It sure as death and taxes wasn't a trap for me. It's only a trap if you are accustomed to thinking in a certain fashion, which is not universal and happens not to be the least bit Perlish. It's a common trap *mostly* because so many people come to Perl from a C or C-like language background; otherwise, it would not be a trap at all.

I don't think it's possible to eliminate all the traps for people coming from other languages, because each other language will have its own set of traps. When you move from one language to another, you should expect to get caught by a few of these misunderstandings until you learn to think in the new language. As long as you're still thinking in another language and translating, you're going to get confused sometimes. That's unavoidable.


"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.