Remember that the benefit of older perls is larger than you think. The big win is that they are fast. Essentially, if you don't have to deal with Unicode, you don't pay for a lot of overhead. In the C code there is lots of if (unicode) {do_this} else {do_that}. Signal handling has also been made safer since then, at a slight cost in performance.

In fact there have been lots of things added that impose small performance decreases here and there. But the cumulative effect is profound. Consider 6 hypothetical patches to the core. One imposes a 2% decrease, two more impose a 3% decrease, two, a 4% decrease and a final patch makes things run slower by 5%. Doesn't sound too bad? When you add up the effects (0.98 * 0.97 * 0.97 * 0.96 * 0.96 * 0.95)... you discover you've lost 20% performance.

(I'm just playing devil's advocate here... my home machine is running perl 5.10.0).

Of course, if you are doing Unicode you have no choice, but in other circumstances you do.

When a newcomer to Perl looks at a central module or even at a module in core, they see that we are not using the "advanced" features. What message does that give?

This is a false debate. Some of the most scrofulous C code I ever read was source of the standard C library of a compiler (Zortech C, for memory). Not because the programmers were slouches, but because they were held to an imperative of working around bugs in CPUs, operating systems and even their own C compiler. Lots of comments like "can't do foo() here because of...".

So it's hardly surprising that some of the core module code is messy. That's so you don't have to worry, as a client. Systems code is held to a different standard, and looked at through a different lens. I know lots of people don't agree with this, starting with chromatic, but I still believe you can enjoy writing code that forgoes certain language constructs. Poets call this constrained writing.

• another intruder with the mooring in the heart of the Perl


In reply to Re: The need and the price of running on old versions of Perl by grinder
in thread The need and the price of running on old versions of Perl by szabgab

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.