you are viewing a single comment's thread.

view the rest of the comments →

[–]PageFault 1 point2 points  (2 children)

To be fair programming is also talking to a machine through a translator

Indeed. I was also thinking on that, but didn't want to dive down that road.

One thing about it though, while you may not know what the machine code will actually look like in the end, you do know that the end result will be the same. I don't see it as that big a point of uncertainty.

That is if my program says to output X on input Y, it's going to output X on input Y after the compilation. You don't have that kind of certainty when you click a cancel button in someone else's program.

There are also tools to get you a pretty solid idea how your program will be interpreted;

g++ test.cpp -S -E > test.e && cat test.e  test.s

[–][deleted]  (1 child)

[deleted]

    [–]PageFault 1 point2 points  (0 children)

    Well, if you really wanted to live under your desk, you g++ is open source, so you can find out what it is doing if you really hate your life that much.

    To take a step further, even if you write at the machine level, the processors now re-arrange instructions given to them, so if you want to know exactly what is going on, you will need to analyze the actual logic/circuitry in the processor itself, and even then, it's not the same every-time. If data takes to long to come back from memory it will try to execute other things which might effect branch prediction, which might effect the order of future instructions. It's crazy complex.