Actually all attempts to write a Perl 6 compiler in Perl 5 have shown that it's not a very good idea.

If you want to cover only a small part of Perl 6, the one that's close to Perl 5, your chances are very good, and it runs reasonably fast. Maybe a few Perl5ism leak through, but all in all that's fine. (For example v6 works on that level).

However if you plan to write a full Perl 6 compiler on top of Perl 5, you can reuse less of Perl 5's power for Perl 6, and end up using Perl 5 as an assembly language. Perl 5 is a great high level language, but a rather poor assembly language, so your compiler and the run-time engine becomes slow, very slow.

That happened to the KP6 ("KindaPerl6") compiler, and I guess it will happen to all other Perl 6 compiler projects which use Perl 5 too heavily under the hood.


In reply to Re^2: New Book: Exploring Programming Language Architecture in Perl by moritz
in thread New Book: Exploring Programming Language Architecture in Perl by billh

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.