What ? Command-by-command ? No interpreter is using such crappy technique nowadays. --Taw
Could you elaborate ? --Taw
Every time a perl script is run, Perl compiles it and then runs the compiled code. At least, this is the usual way of using perl, although it's not the only way. --Zundark, 2001 Dec 15
You mean compile to syntactic tree or compile to machine code ? --Taw
An interpreted language is a type of programming language that is not compiled? into [machine code]?, but is interpreted at run-time by the computer, and translated into machine understandable code as required.
It is often a mistake to refer to a language as either "interpreted" or "compiled", because most languages can be implemented in either way, and some languages (like Perl) are compiled at runtime but behave as if they were interpreted. Other languages, like Java, may be partially compiled into an intermediate form which is then interpreted (although that, too, might be compiled). Some languages, though, are specifically designed to favor interpretation.
An example of an interpreted language is JavaScript.
The Java programming language article says:
Yes, and you can also compile Jave straight down to machine code if you like. The above claim that it is a mistake to differentiate between interpreted and compiled languages is IMHO incorrect; every language that has an "eval" statement which lets you construct and evaluate statements on the fly can never be cleanly compiled down to machine code; you will always have to embed an interpreter in your compiled code. --AxelBoldt
I think it's wrong to call languages that use the second way "compiled". In such case there would be virtually no interpreted language in use - no language uses line-by-line parsing nowadays, all "compile" source to some form of internal representation.
Quote from FOLDOC:
Compiler
A program that converts another program from some {source language} (or {programming language}) to {machine language} (object code). Some compilers output {assembly language} which is then converted to {machine language} by a separate {assembler}. ...