Applications generations Flashcards
What are the cons of using interpreters?
Cons of interpreters :
a. But are slower than running compiled code as code must be translated each time it is executed with an interpreter. b. Interpreted code requires an interpreter in order to run on different devices.
What is a translator ?
A translator is a program that converts high-level source code into low-level object code, which is then ready to be executed by a computer.
The different types of translators?
There are three types of translator that convert different types of code and work in different ways, i.e. compilers, interpreters, and assemblers.
How do compilers work?
Compilers translate high-level code into machine code all at once, after carrying out a number of checks and reporting back any errors.
What are the cons of using compilers?
Cons of compilers:
a. This initial compilation process is longer than using an interpreter or an assembler. b. If changes need to be made, the whole program must be recompiled. c. Once code has been compiled to produce machine code, it can only be executed on certain devices - compiled code is specific to a particular processor type and operating system.
What are the pros of using compilers?
Pros of compilers:
a. Compile code can be run in a machine without an actual translator being present in the machine.
How do interpreters work?
Interpreters translate and execute code line-by-line, reporting the immediate error in a line and stopping, useful for testing sections of code and pinpointing errors.
What are the pros of using interpreters?
Pros of interpreters :
a. They initially are faster than compilers as code is instantly executed. b. Code can be executed on a range of platforms as long as the right interpreter is available, thus making interpreted code more portable.
Talk about assembly code and assemblers
Assembly code is considered to be a low-level language that it’s platform specific, as the instructions used are dependent on the instruction set of the processor. Assemblers translate assembly code into machine code.