DEV Community

Discussion on: Explain Interpreted Programming Languages Like I'm Five

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Interpreters don't tend to translate source code into machine code. They run at a higher level converting parsed constructs into dispatchable runtime constructs in their own code. The interpreter is a virtual machine and source code is kept away from the underlying platform.

If the code is converted to target machine code on the fly we tend to call this just-in-time compilation. The key point is that it is compilation, and the code is no longer being interpreted.

It gets fuzzy though since few interpreters work in the source language. They create their own IR (intermediate language) and have an interpreter for that (though some interpreters do directly work off a high-level syntax tree). This creates a fuzzy spectrum between intrepreted languages, virtual machines, and machine code.

Collapse
 
jwalzak profile image
Jason Walzak

This is really good. When I read the question I realized I couldn't answer it, I only had a slight understanding. That interpreted languages didn't need to be compiled.

Thank you.