Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Re: What's wrong with Perl. The writer also is apparently struggling with some key concepts, as in, "I tried using references, but never made it work.". His discussion of lists within lists furthers that point: in his final solution for lists within lists (@b=([(0.8,0.9,1)],2,3,4);,[(...)] is redundant. [...] would suffice. The writer's problems with regards to lists of lists appears to come from mixing up the Perl and Lisp meaning of (...)

Which gets me to one of the main weaknesses of Perl as I see it: Perlopia - the tendency of some to assume DWIM (do what I mean) means do-it-the-way-Perl-does-it. There are some special ways Perl thinks about language that work quite well and there are others that violate most of my intuitions from all the other languages I've learned so far (which for purposes of illustrating range include among them: C, C++, Elisp, Java, Visual Basic, bash, DOS, awk, Pascal, PHP, Javascript).

One Perlish idea that works is context sensitivity. It is tricky to learn properly, but, once learned, it allows for quick and expressive programming. I think it works because context-sensitivity fits nicely into the way our brains process natural language.

One Perlish idea that doesn't work (just my opinion) is the approach to variable scoping. Variables don't come naturally. They are something most of us have to learn to work with. The analytical training of an 8th or 9th grade algebra class is less about quadratic equations (which most people forget) and more about learning how to deal mentally with missing information and symbols that represent a bounded but as yet unknown range of values. Natural language is just not much help here. The closest analog we have is the pronoun.

When we can't rely on natural langauge, we rely on past technical training. For 20+ years I was able to get by on a single mental model of scoping. This model said the names and addresses of variables in an inner block (or lower on the stack) hide the names of variables in outer blocks. If I made a closure it used whatever version of the variable happened to be in play in the scope where the closure was generated. Somewhere in the back of my mind I knew that there were several strategies languages used to create this effect, but I could ignore it and treat it as an implementation detail for the curious.

Not so in Perl. As was made amply clear in this thread, you simply cannot understand the behavior of variables inside closures without understanding that Perl has two different mechanisms for scoping variables. In Perl the implementation details matter. I have yet to be convinced that having to know such implementation details should matter. So far (for me) this feature of Perl has been primarily the source of curious bugs. I might be convinced if someone could show me that such complexity allows me to make a higher level task easier to implement, but that hasn't happened yet.

Best, beth

In reply to Re: disadvantages of perl by ELISHEVA
in thread disadvantages of perl by perldesire

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (8)
    As of 2018-04-25 12:22 GMT
    Find Nodes?
      Voting Booth?