Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (4)
    As of 2014-08-23 09:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (173 votes), past polls