Language Implementation Types

Code that is not in binary (i.e. not machine code) cannot be read by machines, and therefore must be translated to a series of instructions that a computer can understand and execute

The machine code is specific to the target machine (e.g. code compiled for Windows can’t run on Mac), and the language implementation types are different methods of producing the machine code

The implementation types are traits of the compiler or interpreter, not the programming language, though each language typically has a more dominant method
(e.g. C is usually compiled so it may be referred to as a compiled language, though interpreters for C code can and do exist)

Interpreted: translates the code in parts (e.g. line-by-line) and executes just that portion at a time, taking one line at a time to check for common errors like syntax, then translating that line and executing it directly without recording the translation
This means that if you use an interpreter, every time you want the computer to execute the code, the code must be re-read and re-translated.
Languages typically interpreted: Javascript, Python

Compiled: the program in its entirety is compiled in binary/machine code, specific to the target machine (e.g. code compiled for Windows can’t run on Mac) and written to a file (e.g. file .exe, executable) 
So unlike the interpreter, once the .exe is written, you can just execute the file directly since the translated code was saved and is available.
Languages typically compiled: C, C++, C#

The interpreter must be re-run every time the program is started, opposed to the compiler produces an executable file which once finished, is a ready-to-use program with no need for an interpreter on machine to run the code
However, compiling takes a longer start-up time to produce the executable, and interpreted programs have more flexibility and adaptivity to modifying the structure (as well as smaller program size)

Just-in-Time Compilier (JIT): a process to compile the code right before it is run (which is only practical due to the increase in efficiency of CPUs and computers)
Languages typically JIT: Java, C#

Leave a comment