however my question is why an interpretor... Historically that is, are there strong advantages to creating an interpretted language over a compiled one. I am still not really sure I understand why a compiler for perl would be such a bad idea. What aspects of the language could not be supported by a compiler?

A compiled Perl script needs to have the whole Perl compiler/interpreter (it can be called either or both, depending on your point of view) bundled with it mostly because of `eval STRING'. For `eval STRING' to work, you have to be able to do everything you can do in the compile phase at runtime.

This topic just yesterday came up on the perl6-internals list. As it hasn't yet been captured by mail-archive, here's a message I sent:

The problem isn't the speed of `eval STRING' or the compilation system,
it's how to make it exist and work. To make `eval STRING' work, the
whole of the compiler has to be there, waiting, whenever a program is
run. That means a theoretical binary compile of `print "Hello world\n"'
has to come packaged with howevermany megs the Perl executable takes up.
And that all ports, for example JVM and Palm, have to implement the
compiler natively, rather than just having code compiled elsewhere and
sync-ed to the Palm or run from the JVM.

Simply deciding that `eval STRING' is "unimplemented" on these
theoretical ports and binary compiles is the best idea I've heard yet,
but we should remember that `require' is built on `eval STRING'.

There are a lot of issues involved here, but that's basically the executive summary of why all of Perl can't be supported by a "reasonable" compiler.

-dlc


In reply to Re: Why has perl never been a compiled language... by dchetlin
in thread Why has perl never been a compiled language... by zigster

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.