Nepedia
Back to Discover
Independent Reader
💻

Interpreter (computing)

technology Maturity 7-9 Next article →

Computers run code in different ways. One way is to use an interpreter. An interpreter is software that runs code directly. It does not turn the code into machine code first.

W3sDesign Interpreter Design Pattern UML
W3sDesign Interpreter Design Pattern UML

Most programs use a compiler. A compiler translates code into machine code before it runs. This can be slow for the person writing the code. An interpreter can be faster for testing new ideas. It lets you change and run code quickly. This is called a short edit-build-run cycle.

Some interpreters use a middle step. They turn the code into bytecode. Bytecode is an intermediate format. This helps the code run faster. Some systems use just-in-time compilation. This is also called JIT. It turns bytecode into machine code while the program is running. This gives you the best of both worlds.

Interpreters are very useful. They can act like a virtual machine. This lets one computer act like a different kind of system. This is helpful for emulation. Emulation is when one system mimics another. You can also use them for sandboxing. This helps keep a computer safe by blocking bad code.

187 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:W3sDesign Interpreter Design Pattern UML.jpg
W3sDesign Interpreter Design Pattern UML.jpg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.