Nothing impressed me about perl when I first encountered it :-) It was only after being asked to implement things with it that I realized how great it was. I was coming from Java at the time, and I was most impressed with how effective perl's primitive-seeming building-blocks were at building advanced programs.

For example, in Java a hash table uses objects for keys, and each object needs a properly implemented hashCode() method which implements your concept of equality for that object. In perl, hash table keys are always strings, which seemed like a short-sighted generalization, until I realized that it really did fit all problems pretty well and saved me the effort of writing those hashCode() methods or even needing strong object types for the things I was putting into it.

Likewise, the concept of underscores denoting which methods are private on an object seemed crude at first, but then it just works rather perfectly. And how the storage for attributes is just a hash key of the same name as the method... in Java and C++ it's a constant hassle that the names of methods and names of field storage share the same namespace. I love how perl separates them.

I was also impressed that even though every single attribute access is a function call and a hashtable lookup, it runs decently fast. Coming from compiled languages, I never would have believed it. (but I did have an event where one of my designs was killed by Moose performance impact, so I abandoned that ecosystem fairly early)


In reply to Re: When you first encountered Perl, which feature amazed you the most? by NERDVANA
in thread When you first encountered Perl, which feature amazed you the most? by talexb

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.