I assume that this is more a nod to perl6/parrot than perl5.

It's much more likely for the former than the latter. Nothing in the design of Perl 5 makes this impossible—most of the problem is that the internals of Perl 5 make it herculean.

Perl 6 (Python, Ruby etc), would be better served by compile-to-native facility I think.

You can only get so far with AOT compilation because you can't coalesce all variant types into a single possibility in most programs without evaluating them. That problem is worse in Perl 5 than in Perl 6, but it still holds true for any program where you have runtime manipulation of metaobjects (or byte code or parse trees or...) or dynamic loading. You can use a technique such as profile-driven optimization by running a typeful profiler against a comprehensive test suite, but even in that case you probably have to add guard conditions to your optimized code as a sop to uncertainty (if you trust your test suite that much).

(I know you know this, but perhaps other readers do not.) eval and dlopen and AUTOLOAD and gradual typing mean that you don't always know enough about what's going on in any given code unit to optimize it fully until you actually execute it.


In reply to Re^9: Some thoughts on Moose Attributes by chromatic
in thread Some thoughts on Moose Attributes by John M. Dlugosz

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.