Compilers and Intepretors Characteristics: Flashcards
What is a compiler?
= Translates source code into object code and then machine code to be executed by the CPU.
= Whole programme is translated into machine code before running.
What are the advantages of a compiler?
= Execution speed is faster.
= Code is usually optimised.
= Original source code is kept secret.
What are the disadvantages of a compiler?
= Programme will not run with syntax errors= makes it difficult to write the code.
= Code needs to be recompiled when code is changed.
= Designed for a specific type of processor.
What is an intepreter?
= Translates source code into machine code ready to be processed by the CPU.
= Translated line by line when the programme is running.
What are the advantages of a intepreter?
= Stops when finding a syntax error.
= Does not need to be recompiled when code is changed.
= Easier for begginner coders.
What are the disadvantages of a intepreter?
= TRanslation software is needed at run time.
= Speed of exeuction is slower.
= Code is not opttimised.
= Source code is needed.