in reply to perl language

The clear distinction is obvious when you ask/answer the question "who executes the code?" In the end it is always the processor, but the question is: is that code run by the processor directly or is it handled by a virtual machine (see Java). While the Perl Virtual Machine is not a coined term, the Perl code is read an interpreted by a similar virtual machine. C code is compiled directly in binary read, understood, and executed by the processor directly. The Perl code does not reach such a stage of refinement. A compiled code only needs a processor to run, interpreted code needs this run-time environment to execute (Perl interpreter, JVM, etc.)

Replies are listed 'Best First'.
Re^2: perl language
by Jenda (Abbot) on Nov 12, 2007 at 17:57 UTC

    Well ... C code may be compiled to a machine language understood by the processor, but it's still just as dependent on it's run-time environment as Perl code is. Sometimes the runtime is linked into the program, but most of the time it's an external dynamicaly loaded library.

    And of course very few programs, no matter in what langauge, can get by without the help from the OS.

    Plus some processors do not really implement their machine language in the wires and transistors, but instead the ops are implemented in another, more low-level language. It's just that it's built into the processor and you are not allowed to use the microinstructions directly.

Re^2: perl language
by hashin_p (Initiate) on Nov 12, 2007 at 16:35 UTC
    So Perl is like java which is compiled and interpreted and c is compiled-linked and run by the processor.. That makes sense..
      So Perl is like java which is compiled and interpreted and c is compiled-linked and run by the processor.. That makes sense..

      Usually, when a lot of brute-force processing needs to be done, you want to avoid virtual machines, and get right to the hardware, preferably with a language which can generate very good machine code, e.g., when you need to run a 1,000,000 DOF finite-element model, large-scale n-body simulations, or climate modeling, saving a few nanoseconds per computation can really add up.

      Most tasks aren't anywhere near that computationally intensive.

      "Interpreted" also sometimes seems to mean "entered into an IDE which continually checks syntax," with "compiled" meaning "completely entered into a file, which is then passed through a 'compiler' or 'interpreter'."

      By this, I mean something like this: (> indicates what person enters; < indicates what system returns)

      <PIRNT 'Today is Tuesday' >PIRNT NOT RECOGNIZED <WRITE 'Today is Tuesday' >WRITE NOT RECOGNIZED <PRINT 'Today is Tuesday' >Today is Tuesday <QUIT

      ciao