interpreters/compilers

interpreters/compilers

Before a program can run it has to be translated into CPU(Central Processing Unit) instructions. This can be done with a compiler, and/or a interpreter. A compiler is programming language specific and computer specific(so the final product will only work on say a Mac or a PC), so the source code(what the programmer actually typed) is turned into object code by the compiler, and is saved as a object module, if their are multiple modules for one program then a linker(a program that combines all of the object modules) combines them to make a executable program. Once the executable program is made it can be exported to users. The reason that someone may not use this method is because it is computer specific so, you would need to know what kind of computer the person had in order for them to get the right version, and maintaining multiple versions of one program is expensive.

Interpreters look at the source code and executes the instructions. So it needs access to the source code and it doesn’t save any sort of compiled code or executable code like a compiler would. This means that every time it is run it needs to be reinterpreted. The reason someone wouldnt use this method is that that person may want the source code to be confidential, and in order for a interpreter to work it needs the source code, which means it cant be confidential.

One thought on “interpreters/compilers

Comments are closed.