Fly with code

Get wet inside ocean of code

0%

Difference between compiled and interpreted language

1
2
3
In a compiled language, the target machine directly translates the program. In an interpreted language, 
the source code is not directly translated by the target machine. Instead,
a different program, aka the interpreter, reads and executes the code.

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