There is info in the compiler binary that isn’t in the source code. Suppose the language contains the constant Pi.
The lines in the compiler that deal with this look like
If (next token == “Pi”){
return float_to_binary(Pi)}
The actual value of Pi, 3.14… is nowhere to found in the source code, its stored in the binary, and passed from the compilers binary into the compiled binary. Of course, at some point the value of Pi must have been hard coded in. Perhaps it was written into the first binary, and has never been seen in source code. Or perhaps a previous version contained return float_to_binary(3.14) instead. Given just the source code, there would be no way to tell the value of Pi without getting out a maths book and relying on the programmers using normal mathematical names. The binary is a transformation of the source code, but that doesn’t stop the compiler adding info. A compiled binary contains info about which processor architecture it runs on, source code doesn’t, and so can be compiled onto different architectures. A compiler adds info, even to its own source code.
There is info in the compiler binary that isn’t in the source code. Suppose the language contains the constant Pi.
The lines in the compiler that deal with this look like
If (next token == “Pi”){
return float_to_binary(Pi)}
The actual value of Pi, 3.14… is nowhere to found in the source code, its stored in the binary, and passed from the compilers binary into the compiled binary. Of course, at some point the value of Pi must have been hard coded in. Perhaps it was written into the first binary, and has never been seen in source code. Or perhaps a previous version contained return float_to_binary(3.14) instead. Given just the source code, there would be no way to tell the value of Pi without getting out a maths book and relying on the programmers using normal mathematical names. The binary is a transformation of the source code, but that doesn’t stop the compiler adding info. A compiled binary contains info about which processor architecture it runs on, source code doesn’t, and so can be compiled onto different architectures. A compiler adds info, even to its own source code.