Compilation is a very “lossy” process, all the information in the source code that exists purely for the benefit of humans (like variable names and intuitive instructions like “do this X times”) simply does not exist anymore in the machine code. It’s all replaced by a huge list of numbers and single-file instructions for the benefit of the computer, we have to rediscover their purpose from lots of experimentation and context clues, give them intuitive names and structure, etc.
This is true, but as someone who’s done basic decompiling, the biggest annoyance I had was compiler optimisations. Some loops will be expanded into 70 lines, functions will be severely limited in output/ input with types I don’t understand, and some basic procedural code gets split into 100 different 2 line functions.
These are just all sensible changes for optimal processing, but the whole human readability of it is gone.
It’s like someone went through an essay and replaced every word with the shortest synonym from a thesaurus. It still technically correct, technically makes sense, but it’s incredibly harder to parse with my human brain.
I always wondered why the translation from code to program wasn’t easily reversible. That never made sense to me.
Compilation is a very “lossy” process, all the information in the source code that exists purely for the benefit of humans (like variable names and intuitive instructions like “do this X times”) simply does not exist anymore in the machine code. It’s all replaced by a huge list of numbers and single-file instructions for the benefit of the computer, we have to rediscover their purpose from lots of experimentation and context clues, give them intuitive names and structure, etc.
This is true, but as someone who’s done basic decompiling, the biggest annoyance I had was compiler optimisations. Some loops will be expanded into 70 lines, functions will be severely limited in output/ input with types I don’t understand, and some basic procedural code gets split into 100 different 2 line functions.
These are just all sensible changes for optimal processing, but the whole human readability of it is gone.
It’s like someone went through an essay and replaced every word with the shortest synonym from a thesaurus. It still technically correct, technically makes sense, but it’s incredibly harder to parse with my human brain.