1 | In a compiled language, the target machine directly translates the program. In an interpreted language, |
Compiled language
- Is converted directly into machine code.
- faster and more efficient to execute.
- Need to “rebuild” the program every time you need to make a change
- Additional time needed to complete the entire compilation step before testing
- Platform dependence of the generated binary code
- Example: C, C++, Erlang, Haskell, Rust, and Go
Interpreted language
- Use interpreter to read and executes the code.
- Interpreters run through a program line by line and execute each command.
- Interpreted languages tend to be more flexible
- Offer features like dynamic typing and smaller program size
- The code itself is platform independent.
- Slower execution speed compared with compiled language.
- Example: PHP, Ruby, Python, and JavaScript
There is no 100% Compiled or Interpreted language
- Most programming languages can have both compiled and interpreted implementations