Skip to content
scrambled
Programming Language Theory Flashcard

What is the difference between a compiler and an interpreter?

Books Concepts Deckprogramming-language-basic

Question

What is the difference between a compiler and an interpreter?

Answer

  • A compiler can be treated as a function that carries a program in the source programming language to another target programming language.

    Compiler:𝒫S→𝒫T
  • An interpreter can be treated as a function that carries a program into a value.

    Interpreter:𝒫→V