An interpreter is a program that executes source code directly, translating and running it as it goes rather than producing a standalone executable first. Python, Ruby and PHP are typically run through interpreters.
Why it matters
Interpreted languages give a fast feedback loop: edit a file and run it immediately, or try code line by line in an interactive prompt. That makes them popular for scripting, prototypes and web back ends. The cost is usually lower raw speed than compiled code, although modern interpreters use techniques such as just-in-time compilation to narrow the gap.
Example
$ python3
>>> price = 40
>>> price * 1.18
47.199999999999996
>>>
Each line runs as soon as you press Enter. The result also shows a classic floating-point rounding artifact, which is a property of binary arithmetic and not an interpreter bug.
Common mistakes
- Thinking an interpreted language never compiles anything; CPython compiles to bytecode before interpreting it.
- Assuming errors will show up before running; many are only found when that line executes.
- Running the wrong interpreter version, for example Python 2 instead of Python 3.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.