5
Large
6y

Alright so this guy is arguing with me about programming, saying that I don't understand how a compiler works because I said that computers parse code when executing it. He says I'm wrong because the code is in machine language. Who is correct?

Comments
  • 3
    Depends what language you're talking about. Really though, if you're talking compilers, he's right; compilers generate machine code which is executed, a compiler (aside from a JIT) doesn't do anything at run time.
  • 0
    @Zaphod65 am I wrong to believe that the machine language is parsed upon execution?
  • 1
    I didn't understand the last question...

    But, for a compiled language like C/C++ compiling means "translate code to assembly (machine language)"...

    When executing the processor reads the compiled code directly...

    C# and Java are also compiled but translate into a levering framework... Java uses the JVM that is like a virtualized processor and ALU.

    Other languages are interpreted like JavaScript or PHP... There is a framework that will take the code as is, interpret it and execute it ...
  • 1
    @Large as I understand it, yes you are wrong. I don't believe that what happens to machine code is, at least by what we use the term for the rest of the time, parsed at all. I'm oversimplifying (partially because I don't fully understand it), but my understanding is that basically you throw the binary executable at the processor and it does whatever. It's certainly not parsing in the same sense that we parse JSON or Java or whatever.
Add Comment