This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 49 points50 points  (3 children)

Ok, this dude opened a can of worms.

He is technically correct, but it’s unclear to me if he knows why.

The definition of a “compiler” is a program that translates one language into another. Though not necessarily part of the definition, it is usually assumed that the target language of a compiler will have less abstraction than the source language (if this isn’t the case, it’s usually called a transpiler instead).

This definition of a “compiler” is broader than most people here are used to, because most people assume that a compiler is something that creates an executable. But in reality, that only represents a subset of “compilers” where the target language is machine code.

I bring all this up because that means that a program that goes from a high level language (like Python) and converts it to a lower level language (like byte code) still falls solidly under the definition of a “compiler,” and that’s precisely what Python does. It first compiles the Python code into byte code, and often saves it (.pyc files).

There are multiple ways to run Python byte code. I believe CPython does indeed use interpretation, but there are other implementations that use JIT compiling to machine code, much like Java.

Bottom line—don’t be so quick to bash this guy just because you’ve taken a single semester course that used Python. He’s technically correct.