Dear Monks,
I started the day thinking of other things, and the first thing I read was Perl 5 Optimizing Compiler by
Will_the_Chill and I stated
my opinion. So instead of doing real work, I thought about this question/problem about a compiler for Perl.
But instead of going after the obfuscation angle, I'd like to ask the Monks that understand the internals of Perl, why this is so elusive. Just to be sure, I did read the references in the discussion, but I still have some fundamental questions:
- If I type 'perl -cw script.plx' on the command line, I believe Perl compiles the script into bytecode, issues errors if any, and then exits. At that final point before exiting, is the bytecode tree different for every operating system? Every Perl version?
- If Perl had a parameter to generate and save the bytecode tree, would that tree be able to be executed by Perl?
- Could a subset of the Perl language be defined to allow the bytecode to be system independent?
The computers today are very fast, and I expect will continue to get faster, so converting Perl to C may or may not be needed (Others can decide/argue that point). I work on many computers today, that whether I execute a 'C' program or a Perl script, I get an immediate prompt, so do we care whether it took 200ms or 300ms.
Whether 'Big Data' needs a Perl to C compiler I don't know, and I think Perl is the best computer language I've found, but I also think that a built-in bytecode 'compiler' would enhance Perl greatly, but I also realize that there may be many valid technical reasons why it can't be.
Thank you...Ed
"Well done is better than well said." - Benjamin Franklin
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.