Mail Archives: djgpp/1997/06/04/09:33:20
On 3 Jun 1997, Paul Derbyshire wrote:
>
> In a way, machine code is interpreted by processors. So, the difference
> between a compiled language like C and an interpreted one like BASIC is
> actually how deeply nested interpreters are.
>
> The next lower level thing to machine code interpreted by a CPU, is a
> hardware circuit with a fixed purpose. These are even faster than compiled
> code. Future computers my be hybrids with CPUs and FPGAs...
OK I'm finally going to join this thread and add my $0.02 in the hopes of
ending it. When one stands between speaker and listener, translating
from the language that the one is using into a language which the other
understands, whether or not it is his native tongue, in real time, one is
acting as an 'interpreter'. If I transcribe the translation for later
consumption I am merely a translator and not an interpreter.
By extension, in the world of computers, an interpreter is a software
program which translates from human programming source language, to a
language which the machine understands, on the fly, executing the machine
understood language in real time. Whether or not that language is
actually further translated to micro code within the hardware is
irrelevant just as it is irrelevant whether the listener understands the
Italian I translate the Greek into or further translates the Italian into
Swahili in his own mind. However, when the translation is performed
independently from the execution and the translation saved for execution
later then the language has, as in the human example, merely been
translated or compiled for later execution. Indeed compilers were
originally called translators, nodding to the linguistic metaphor used to
name translators and interpretors. Later when someone pointed out that
interpretation was just a special case of translation, the term
translator began to be used to describe both translators and compilers.
Hence, GBASIC and BASICA are interpreters, even though they can
precompile their source language into an intermediate code, since they
must translate either source language or BASICA intermediate code to
machine instructions at run-time. However, QuickBasic, Microsoft
Professional Basic, TurboBasic, OmniBasic, etc are all compilers since
their output is a machine executable program which needs no translation
at run-time.
Any questions? No? Good! End of thread? Please.
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -