r/ProgrammerHumor • • Jan 10 '19

Meme C with Other Programming Languages

Post image
1.6k Upvotes

158 comments sorted by

View all comments

Show parent comments

1

u/ForceBru Jan 11 '19

Yes, C is definitely not interpreted!

According to “my” rules, a language is interpreted if it’s translated to a representation other than assembly, and this very representation executed directly by the interpreter. Clang compiles C to LLVM bytecode, just like Rust, but this bytecode is not executed directly. That’s the difference between compiled and interpreted languages.

Never ever have I said that Python is compiled to machine code, nor do I think it is. It’s compiled to bytecode for the Python VM, regardless of whether the latter has a well-known and/or stable across releases definition or not. Python code is not run directly, it’s its bytecode representation that is run.

Probably there’s some confusion about what bytecode is. There’s bytecode directly executable by the CPU (like x86 bytecode) and bytecode executable by virtual machines, and the two aren’t the same thing. Python compiles to its own, custom bytecode, and so does Java (yes, the Java bytecode can later be translated to actual CPU bytecode).

  • Java’s bytecode is used to run the program, so Java is interpreted;

  • Java’s bytecode can be translated into machine code, so Java can be compiled;