Hacker News new | ask | show | jobs
by jagged-chisel 103 days ago
Sounds like a "no true Scotsman" statement. How are you defining "real"?

Some human, somewhere, has to describe how to turn high-level language constructs into machine code. "When you see this pattern, emit this sequence of bytes." That's just templates and stencils. There's no magic for turning source code into machine code by divining the ISA at compile time.

Anything that's taking source code and, at the time of execution, is compiling it to machine code on-the-fly is JIT compilation. Regardless how long it takes, lack of optimization, or which machine is the target (x86, ARM32/64, RISC-V, JVM, WebAssembly), it's JIT.

1 comments

I thought the difference was that a JIT is used alongside an interpreter? It wouldn't need to do optimization, just compile while interpreting?
How is “alongside an interpreter” meaningfully different than “at the time of execution”?
"at the time of execution" could mean that your program never runs an interpreter and instead compiles the input code before running any of it, basically like the --run option in the tiny c compiler