QUOTE
Compiler
The compiler is a program that "translates" the entire program in to assembly object code that then goes through a linking process to create one large binary executable file. Advantage of the compiler is that it can see the "big" picture and may go through more than one pass to make sure the translation is correct. A disadvantage of compiling is that any changes or modifications to the code require a complete rebuild/ compile-link process.
Interpreter
This is a program that interprets each line of code one at a time and then executes them one by one. The advantage of this is that the code itself can modify itself as needed while it is executing. The disadvantage of this is that the interpreter only sees the little picture and may execute instructions out of context and there is no way of "speeding up" the code by optimizing the way the code is sent to the processor.
Language - Level - Compiled or Interpreted
Assembly - Low - Compiled/Assembled
C(++) - Medium - Compiled
Java - High - Interpreted
Fortran - High - Compiled
Perl - High - Interpreted
Basic - High - May be compiled Most often Interpreted
We see from the above table that Java is interpreted and that C(++) is compiled. Which is better? To be quite honest each is the best for each use. C(++) is the languaget to write most application programs such as Netscape, Word, etc. It is the preferred language to write these becuase these are compiled few times in comparison to the number of times it is executed. Much work has gone in to the improvement of the compilers to provide optimized efficient executing files. C(++) allows direct interaction with the hardware of the system.
Java on the other hand runs on top of a software emulated Java virtual machine (JVM). Becuase the hardware is "emulated" using software there is no actual access to hardware by Java. So the Java byte code is executed one line at a time or interpreted. To take advantage off this Java programs can actually be modified while they are actually running. Since these are often used as programs over the networklk you can update them even while they are in use without requiring the system or program itself to be shutdown or restarted.
This is basically the long way of saying that each magnifies it's strengths by understanding their weaknesses.
I hope all this helps a little.
The compiler is a program that "translates" the entire program in to assembly object code that then goes through a linking process to create one large binary executable file. Advantage of the compiler is that it can see the "big" picture and may go through more than one pass to make sure the translation is correct. A disadvantage of compiling is that any changes or modifications to the code require a complete rebuild/ compile-link process.
Interpreter
This is a program that interprets each line of code one at a time and then executes them one by one. The advantage of this is that the code itself can modify itself as needed while it is executing. The disadvantage of this is that the interpreter only sees the little picture and may execute instructions out of context and there is no way of "speeding up" the code by optimizing the way the code is sent to the processor.
Language - Level - Compiled or Interpreted
Assembly - Low - Compiled/Assembled
C(++) - Medium - Compiled
Java - High - Interpreted
Fortran - High - Compiled
Perl - High - Interpreted
Basic - High - May be compiled Most often Interpreted
We see from the above table that Java is interpreted and that C(++) is compiled. Which is better? To be quite honest each is the best for each use. C(++) is the languaget to write most application programs such as Netscape, Word, etc. It is the preferred language to write these becuase these are compiled few times in comparison to the number of times it is executed. Much work has gone in to the improvement of the compilers to provide optimized efficient executing files. C(++) allows direct interaction with the hardware of the system.
Java on the other hand runs on top of a software emulated Java virtual machine (JVM). Becuase the hardware is "emulated" using software there is no actual access to hardware by Java. So the Java byte code is executed one line at a time or interpreted. To take advantage off this Java programs can actually be modified while they are actually running. Since these are often used as programs over the networklk you can update them even while they are in use without requiring the system or program itself to be shutdown or restarted.
This is basically the long way of saying that each magnifies it's strengths by understanding their weaknesses.
I hope all this helps a little.
Wow, nice post, that helped me, and I program in Java and C++, lol. Really, nice guide thingy, I like it.


