in reply to Re: ISO technical document outlining system requirements for Perl
in thread ISO technical document outlining system requirements for Perl

Oh, it's not a Perl compiler - it's a Perl interpreter. Perl compilers are different beasts.
The beast I have in /usr/bin/perl compiles Perl, and has no idea how to interpret Perl. One could say /usr/bin/perl is interpreting the results of the compilation of Perl, but that's not what's usually understood by interpreting.

/usr/bin/bash is an interpreter. /usr/bin/perl isn't.

Abigail

  • Comment on Re: ISO technical document outlining system requirements for Perl

Replies are listed 'Best First'.
Re: Re: ISO technical document outlining system requirements for Perl
by dragonchild (Archbishop) on Mar 03, 2004 at 22:55 UTC
    /usr/bin/perl compiles Perl to opcode, then interprets those opcodes. From a black-box view, it's interpreting Perl, regardless of how many internal steps it takes to get there.

    This is opposed to the black-box view of gcc, which solely compiles C into the opcodes (or ASM) for the OS it's targeted to compile to.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      From a black-box view, it's interpreting Perl, regardless of how many internal steps it takes to get there.
      That's silly. That would mean that
      #!/bin/bash gcc -o blabla program.c ./blabla rm blabla
      is a C interpreter.

      I've never heard of a definition of an interpreter as "a compiler that directly executes the code it generates".

      Abigail

        Definition of interpreter: "An interpreter translates high-level instructions into an intermediate form, which it then executes. ..."

        By that definition, your bash script most definitly is an interpreter. And, so is Perl.

        Another definition I saw "a program that translates and executes source language statements one line at a time". By that definition, neither your script nor Perl is an interpreter. (That definition was also found here and here.)

        *shrugs* The devil's in the details, I guess. I take a black-box approach, which is supported by webopedia. You are taking a white-box approach, supported by hyperdictionary, computerdictionary, and thefreedictionary. If we were to vote on it, you'd Kerry my Edwards, I guess. *grins*

        ------
        We are the carpenters and bricklayers of the Information Age.

        Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Re: Re: ISO technical document outlining system requirements for Perl
by BUU (Prior) on Mar 03, 2004 at 21:47 UTC
    I thought /usr/bin/perl did both. First it compiled the program in to opcodes or something, then it interpreted them?
    A reply falls below the community's threshold of quality. You may see it by logging in.