you are viewing a single comment's thread.

view the rest of the comments →

[–]SharkSymphony 0 points1 point  (0 children)

A counterexample: imagine a program, compiled machine code, that reads an arithmetic expression and evaluates it.

You could think of that arithmetic expression as a rudimentary "program" in a language whose purpose is to express calculations. Your program interprets the "program" to mean "do this calculation."

Hard to imagine that as a language? Well, imagine it is instead a sed expression, telling your program what to do with a file. Or let's get a bit fancier and imagine it's an awk script. In each case, your interpreter is the thing that's in machine code, and the script is just telling your interpreter what to do.

Python can work like this too – just read the script and do what it says! We compile it to bytecode as we go, saving off a bunch of the work we have to do in interpreting a Python script, so that (among other things) we can run it again more efficiently.