文章出處

今天坐公交時用手機打開 .NET Blog 閱讀這周的 The week in .NET ,在看 Virtual Panel: What's Next for .NET?  這篇采訪報道時,被其中對 Richard Lander (Principal Program Manager Lead on the .NET Team at Microsoft) 的一段采訪所吸引:

InfoQ: How has the emergence of Roslyn helped the growth of the .NET platform and your language? (C# / F# / VB .NET as appropriate)

Richard Lander: This is a really easy one, and I'm going to bend the question a bit to enable me to include the runtime in the equation. If you think of the .NET runtime, it enables these languages and Roslyn to exist, given the model (mostly garbage collection and type-safe memory) that they expose to developers. So, the absence of that would be C++ (ignoring other industry peers for the moment). The developers on the runtime team work in C++  so that Roslyn can exist and you can use C#. That is very charitable of them!

csc.exe (the pre-Roslyn C# compiler) was also written in C++, so the same model applies there.

It turns out that the developers who write the native components of the platform like C# better. News flash, eh? They actively find ways to do more of their job in and convert more of their codebase to C#. It's a massive over-simplification, but you can think of Roslyn solely as a project to rewrite csc.exe in C#. At the same time, there has been an equally significant trend to rewrite runtime components in C#, too. Particularly for the runtime, it's a significant architectural effort to convert runtime components to C# since you have a bootstrapping problem, but it's worth it.

A C# code-base is hugely beneficial over C++ for a few reasons:

  • It vastly increases the size of the developer base that can contribute to the codebase.
  • We have excellent tools for C# that make development much more efficient.
  • It's straightforward to make a .NET binary work on other chips and operating systems. This is great for bringing up a codebase like .NET Core on something like Raspberry Pi.
  • It's easier to reason about security issues.

So, in my view, the primary trend is moving our existing C++ codebase to C#. It makes us so much more efficient and enables a broader set of  .NET developers to reason about the base platform more easily and also contribute.

用 C++ 開發 的 .NET runtime(估計這里就是指 .NET Core runtime )的組件正在被用 C# 重寫,C# 不僅是開發 .NET 應用的首選語言,而且可能取代 C++ 成為開發 .NET runtime 的首選語言,從而成為 .NET 平臺的通用語言。如果 C# 既能開發應用,又能開發底層,隨著 .NET 跨平臺的進展,C# 有望成為 C, C++, Java 之后最流行的編程語言。


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()