2 ms·
> We need better and more rigorous terms in computing science. You can have terms that are precise and unchanging, and terms that are useful in today's computi
by munificent 6y ago
> We need better and more rigorous terms in computing science.
You can have terms that are precise and unchanging, and terms that are useful in today's computing landscape, but you can't have both.
Grace Hopper, who coined the term "compiler" used it for what we'd today call a "linker-loader".
Many C/C++ compilers emit textual assembly code which is then assembled as a separate step to machine code. The machine doesn't execute assembly, so are those still "compilers"?
Nikaus Wirth's Pascal compiler compiled to bytecode, not machine code. Likewise, almost all Java and C# compilers today target bytecode and not machine code. Are they compilers? What if I take that bytecode and run it on a Java processor (https://en.wikipedia.org/wiki/Java_processor https://en.wikipedia.org/wiki/Java_processor)? Was javac not a compiler before Java processors existed but spontaneously became a compiler once the chip was shipped?
The V8 JavaScript engine parses your JS, compiles it to bytecode, runs that in an interpreter, uses the results of that to re-compile the code to machine code, and runs that again. The user never explicitly invokes a compiler or sees any machine code written to disk. Is V8 an interpreter? A compiler? Both? If you never run a JS program long enough for the JIT to kick in, is it still a compiler?
Some emulators for game consoles take game ROMs compiled to machine code for a different architecture and interpret them a virtual instruction at a time. Others take the ROM and recompile its machine code to new machine code for the host architecture, so they just treat the original machine code as an input format. Does that mean whether the ROM contains "executable machine code" versus "source code" depends on which emulator you run it in?
When Apple transitioned from 68k to PowerPC, newer PowerPC Macs ran old 68k apps in an emulator. Did those apps still contain "executable machine code"?
Modern CPUs implement large instruction sets by translating them down to microcode. If you compile to the larger ISA which is not what the chip actually executes, are you still outputing "executable machine code"?