Eli5: If a compiler is a program that converts your code into binary form for the computer, unless my understanding is incorrect and it isn’t just a program, wouldn’t the compiler also need a compiler to run it since how do you run a program without a compiler?

1.08K views

Eli5: If a compiler is a program that converts your code into binary form for the computer, unless my understanding is incorrect and it isn’t just a program, wouldn’t the compiler also need a compiler to run it since how do you run a program without a compiler?

In: 360

25 Answers

Anonymous 0 Comments

It doesn’t convert your code into binary, it converts it into machine code that can be executed on the hardware. That is assuming you are compiling a program using a language like C++ which is compiled, there are just in time compilers like Java that converts it to java bytecode and then interpreted languages like python.

Say you are testing your code on Visual Studio and you do the ‘compile and run’, it compiles in some temp directory then runs as if it were installed on your computer, submitting the converted code to the operating system. All of that is hidden away from you but that is kind of what is happening under the covers.

You are viewing 1 out of 25 answers, click here to view all answers.