…
I have no idea what a compiled language is.
…
I have no idea what a compiled language is.
A compiler is a function “c(script: string) -> byte[]” that instead of running the script, outputs a binary that does the same thing as the interpreter, but more efficiently.
Commonly this means converting the human-readable script syntax to binary machine code that a CPU can run directly, but platforms like Java and .NET actually do this through multiple steps with an intermediate “byte code” that CPUs can’t execute without a lightweight runtime.
The benefit of the JIT is that it makes the compiler code portable to other CPU architectures without having to ship the source code. It is simple enough that interpreting it is just a “while” loop that bumps a pointer, reads the next instruction bytes, and uses a giant switch table to decide what to do.
If you squint at it, machine code is the same, except that the “loop and switch statement” is hard wired into the silicon.
This sounds like any of a dozen different computer science university programs I am familiar with.
But in casual use, "compiled language" means a language that is usually implemented using a compiler.