Viewing a single comment thread. View all comments

Triabolical_ t1_j27hw5e wrote

The other answers are good but are missing some nuance.

The difference between compiled and interpreted is when the translation operation is done. In compiled languages, the translation is done all at once before the code is shipped, and in interpreted languages, it is done when it is run.

There are hybrid approaches, however.

C# is a compiled language, but it's not compiled to machine code - it's compiled to an intermediate language known as ".NET intermediate language" or ".NET IL". That code is then compiled into machine code on the user's machine, but it's done in small chunks using what's known as a "just in time" compiler, or JIT. Except some code that will get used all the time gets compiled into machine code once to avoid the overhead of doing it all the time.

There are other approaches that compile the language to an intermediate language called "p code", and that p code is interpreted when it is executed.

3