Differences between MSIL and Java bytecode?

前端 未结 8 1314
南笙
南笙 2020-12-07 08:08

I\'m new to .Net and I\'m trying to understand the basics first. What is the difference between MSIL and Java bytecode?

8条回答
  •  一向
    一向 (楼主)
    2020-12-07 08:53

    They are essentially doing the same thing, MSIL is Microsoft's version of Java bytecode.

    The main differences internally are:

    1. Bytecode was developed for both compilation and interpretation, while MSIL was developed explicitly for JIT compilation
    2. MSIL was developed to support multiple languages (C# and VB.NET, etc.) versus Bytecode being written for just Java, resulting in Bytecode being more similar to Java syntactically than IL is to any specific .NET language
    3. MSIL has more explicit delineation between value and reference types

    A lot more information and a detailed comparison can be found in this article by K John Gough (postscript document)

提交回复
热议问题