Of course, Perl itself is written in C, so I ask this -- other than the benefits that an interpreted language brings -- rapid prototyping and development -- once I have got my script working, why is it that I can't compile it and get the same level of speed that a native C program would get? Is there a technical reason, a philosophical reason, or is it because doing so would break a law of physics? And, no, running perl scripts inside mod_perl is not a solution here. I am wondering why is it that I can't compile perl scripts to honest-to-goodness-bare-metal-programs-such-as-those-coming-out-of-the-other-end-of-gcc? Wouldn't that be the best of both worlds? I would be able to program faster in Perl and be able to write faster programs in Perl.
Bonus question -- I often read arguments for and against strict typing vs. no typing as in Perl. Other than possibly catching errors and thereby making for more robust programs, strict typing doesn't by itself contribute to any speed gains, does it? It seems like just an excuse for macho programmers to snigger at sissy programmers such as me?
In reply to compiling perl scripts aka why is perl not as fast as C by punkish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |