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

/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.

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

Replies are listed 'Best First'.
Re: ISO technical document outlining system requirements for Perl
by Abigail-II (Bishop) on Mar 03, 2004 at 23:06 UTC
    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.