Advantages and Disadvantages of Using Interpreters
Programmers usually write programs in high level code, which the CPU cannot execute; so this source code has to be converted into machine code. This conversion is done by a compiler or an interpreter. A compiler makes the conversion just once, while an interpreter typically converts it every time a program is executed (or in some languages like early versions of BASIC, every time a single instruction is executed).
An Interpreter is a program which translates the source code into a machine understandable language, and executes it statement by statement. Translation happens on the fly which is followed by immediate execution. This process is more complex which makes interpreted programming languages to run slower compared to languages that are compiled. Compiler in contrast, translates high level language into machine code only once, which later can be executed multiple times (there is no immediate execution needed as it happens in the case of Interpreter). compiled high level language can run on computer that has appropriate compiler for that specific high level language. A benefit of Interpreter over compiler is that interpreter is more portable. It can run on different hardware processors and software while compiler program is written for each software and hardware processor separately. In order to increase portability some programs are first compiled into standard machine language and then interpreted using interpreter. One of the great example is the Java programming language which is compiled into standard machine language Bytecode, and then executed by Java Virtual Machine (JVM), software interpreter. Java programming language can run on any machine that has JVM interpreter; therefore, in order to increase portability of Java first it is compiled into Bytecode and then interpreted by JVM interpreter.
Read more about this topic: Interpreter (computing)
Famous quotes containing the words advantages and/or interpreters:
“... there are no chains so galling as the chains of ignoranceno fetters so binding as those that bind the soul, and exclude it from the vast field of useful and scientific knowledge. O, had I received the advantages of early education, my ideas would, ere now, have expanded far and wide; but, alas! I possess nothing but moral capabilityno teachings but the teachings of the Holy Spirit.”
—Maria Stewart (18031879)
“Anyone who seeks for the true causes of miracles, and strives to understand natural phenomena as an intelligent being, and not to gaze at them like a fool, is set down and denounced as an impious heretic by those, whom the masses adore as the interpreters of nature and the gods. Such persons know that, with the removal of ignorance, the wonder which forms their only available means for proving and preserving their authority would vanish also.”
—Baruch (Benedict)