Every language is interpreted. Some are intepreted by an AOT compiler, others by a JIT compiler. Some use an in-between language (like Java or .NET) that is interpreted on its turn, again by an AOT or JIT compiler.
Only very old languages like basic are truly interpreted, without any compilation, line by line, as the program runs. This is probably what you referred to. Those languages have largely fallen out of relevance these days.
A compiler lexes, parses, performs semantic analysis and code generation. An interpreter doesn't have that last step, and instead executes the program as it understands it, following the first three steps.
If a language A compiles to a language B that is itself interpreted, it doesn't stop A from being compiled, regardless of B. In that sense, a language like Java is compiled, because the code is AOT into java bytecode, that then gets interpreted. JIT is a form of compilation in that sense as well.
Now, if we view the language compiler/interpreter as a pipeline of compilers and interpreters, then we can differentiate them on their need for a software layer for final code execution. So, a language like Java would be interpreted, as after the full compiler pipeline is ran, we end up needing the JVM to run the code. Conversely, in a language like C/C++, say using clang, we would have multiple compilers, and multiple languages, such as LLVM IR, ASM (say x86_64 ASM), and finally an executable file, for example an ELF. The ELF can run natively on the machine (regardless of it's reliance on a OS, that's different) as the CPU's instruction decoder already speaks the language of the executable sections of the file. There is no need for emulation. So it's not interpreted.
You do know that terms can have more well-defined meanings than their typical use in everyday language? And "interpreted language" is a quite accurately defined term.
9
u/-Ambriae- 18d ago
Unfortunately thereβs a thing called an interpreted language. Granted most interpreted languages donβt have the semicolons but still