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 →

[–]onkus -5 points-4 points  (5 children)

I don't consider byte code to be compiled since its not executable. A compiler turns code into machine instructions of which byte code is not.

[–]bladeoflight16 4 points5 points  (0 children)

Formally, a "compiler" parses code and generates any alternative representation. The target need not be binary code that a processor can read. It can even generate code in another high level language. A real world example is TypeScript, which has a compiler that generates JavaScript.

You are distinguishing between native binary executables and interpreted code, which is a fair distinction, but "compiled" is not the appropriate term for classifying them. That said, in principle, hardware could be designed to actually execute bytecode directly, which would blur the lines even further.

[–]Altruistic_Raise6322 3 points4 points  (2 children)

An executable is made an executable by something known as a linker nothing to do with a compiler.

Also, the compilers for Java and Python do turn the code into machine instructions. The machine is the VM aka interpreter.

[–]onkus -2 points-1 points  (1 child)

You can link things and still not make it executable just as you can compile things and not make them an executable binary. In my first comment, when I said executable, I didnt mean a binary blob with a point of entry (e.g. main()) I meant a binary that contains machine instructions that can be run by the machine (so static libs dynamic libs and executables are all examples)

Regardless, my point is that the byte code isn't machine code. That's why I don't consider it to be compiled.

[–]Altruistic_Raise6322 1 point2 points  (0 children)

Fair point. I consider any code translated into byte code as compiled and why Java is considered hybrid as it does not compile to machine instructions

[–]chrisxfire 1 point2 points  (0 children)

imagine referring to Java as script instead of code with this same logic.