http://qs321.pair.com?node_id=238166


in reply to Re: Re: perl2exe - no more secrets
in thread perl2exe - no more secrets

A very good explanation why a "good native compiler" will not be better than the Perl.pl to Perl.exe utilities we already have, can be found in " Why Not Translate Perl to C?".

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re: Re: Re: Re: perl2exe - no more secrets
by Thelonius (Priest) on Feb 24, 2003 at 20:27 UTC
    A very good explanation why a "good native compiler" will not be better than the Perl.pl to Perl.exe utilities we already have, can be found in " Why Not Translate Perl to C?".
    Except that that explanation is baloney. People have been compiling dynamic languages (such as LISP) for decades. Yeah, it's hard. But it does make programs much faster.

      You didn't understand me correctly: I'm not saying that compiled Perl is as fast/slow as interpreted Perl, but that "a good native compiler" will be hard pressed to be faster than Perl compiled with the existing utilities, eg. dump Perl into C and compile this C code.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: Re: Re: Re: perl2exe - no more secrets
by Anonymous Monk on Feb 26, 2003 at 12:51 UTC

    Yeah, I read that one a while back and I completely disagree with it. It sounds kind of like this to me:

    the Perl vm is pretty good for a vm and it might take a little effort to write a better compiler, so perl's perfect again, so yeah, move along. what do you mean that doesn't make any sense? well, you obviously don't know what you're talking about. See this function? it's fast in perl. If I poorly write a c-equivalent, it's slow. So why don't I write it well? because perl is good. Perl rox0rs.

    The end.

    It's very possibly to write a native compiler for Perl that would produce faster, more efficient code. Nobody seems to want to do it though, probably because they don't want to deal with the negative response from the community. So instead they focus on the next-gen scripting languages.

      Big words, no evidence. If it's so very possible to write a native compiler that produces faster, more efficient code, what's keeping you from writing it?

      When you have finished your compiler, come back and show us to be wrong. Otherwise, just shut up.

      Abigail

        what's keeping you from writing it?

        Perl's a nice language, much more practical than it appears at first, but it's not the only language out there. There is substantial room for improvement (even over what I've seen of Perl 6). Writing a compiler involves a substantially amount of work and I'm careful what I invest my time in. If I were to start such a project I doubt it would end up as a perl native compiler. It may have many similiarities, but it wouldn't be Perl.

        When you have finished your compiler, come back and show us to be wrong. Otherwise, just shut up.

        Fair enough. I'll pick one of the two :)

        As for the original post, the parody was meant as a joke and not as disrespectful to anyone. I haven't yet tried to write a perl native compiler, but I see no theoretical reason why one couldn't produce faster, more efficient code.

        Oops, didn't shut up, guess I have to write the compiler now ;).