Is there a difference between a compiler and an interpreter?

7

What's the big difference between a compiler and an interpreter?

In languages like C, Java is used as a compiler. In JavaScript, for example, an interpreter is used, but I was confronted with the JIT (just in time compiler) term.

How can I classify JavaScript processing in this specific case?

    
asked by anonymous 15.03.2017 / 12:46

1 answer

6

Languages are hardly linked to the use of a compiler , interpreter or JITter . Implementations yes. Difference between language and compiler . A compiled language example but has an interpreter is C .

Today browsers and most other JavaScript uses actually use a JITter for more performance, but it is not something inherent in JS. It is common for people to classify the JITting process as an interpretation. In fact the case of JS this occurs even though it has to read the source to generate the native code, in other cases it can read only an intermediate representation.

In the past JS was fully interpreted and there are still implementations like this, although they are practically considered obsolete.

In the future it is possible for JS to be compiled into WebAssembly , as other languages may be used.

See also . And differences .

    
15.03.2017 / 12:51