Why are there four mono C# compilers?

前端 未结 2 1280
日久生厌
日久生厌 2021-02-01 21:00

This page explains about the four different mono compilers - mcs/gmcs/smcs/dmcs.

To me, it\'s a little bit weird to have four C# compilers. As normally the newer versio

2条回答
  •  暖寄归人
    2021-02-01 21:54

    For the same reason you can still do development in .NET 2.0 with Visual Studio 2005. Sure, you could use VS2010 and start a .NET 4.0 project with only .NET 2.0 code, but some companies are afraid of upgrading frameworks/compiler versions if they already have something working properly.

    Just because the new compiler version is backwards compatible does not mean that teams will want to upgrade.

    Having the different compiler versions ensures all of Mono's users can still use whatever compiler version they choose and are comfortable with.

    • mcs: compiler to target 1.1 runtime (to be deprecated with Mono 2.8).
    • gmcs: compiler to target the 2.0 runtime.
    • smcs: compiler to target the 2.1 runtime, to build Moonlight applications.
    • dmcs: Starting with Mono 2.6 this command is the C# 4.0 compiler, and references the 4.0 runtime.

    Personally, I like upgrading whenever I can, but some companies and teams are unable to do so for some reason or another.

提交回复
热议问题