Is C# partially interpreted or really compiled?

后端 未结 13 1140
别跟我提以往
别跟我提以往 2020-12-07 11:51

There is a lot of contradicting information about this. While some say C# is compiled (as it is compiled into IL and then to native code when run), others say it\'s interpre

13条回答
  •  余生分开走
    2020-12-07 12:41

    C# is both interpreted and compiled in its lifetime. C# is compiled to a virtual language which is interpreted by a VM.

    The confusion stems from the fuzzy concept of a "Compiled Language".

    "Compiled Language" is a misnomer, in a sense, because compiled or interpreted is not a property of the language but of the runtime.

    e.g. You could write a C interpreter but people usually call it a "Compiled Language", because C implementations compile to machine code, and the language was designed with compilation in mind.

提交回复
热议问题