C# language design pillars

吃可爱长大的小学妹 提交于 2019-12-10 16:17:24

问题


In the article (http://www.artima.com/intv/nonvirtualP.html) Anders Hejlsberg mentioned that versioning is one of the pillars of C# language design. Does anybody know what are other pillars?


回答1:


I refer you to page one of the C# specification, which describes the important factors that went into the design of the language. A few quotes that indicate what some of the important factors were, and continue to be:

modern, object-oriented, and type-safe

--

immediately familiar to C, C++, and Java programmers.

--

Contemporary software design increasingly relies on software components in the form of self-contained and self-describing packages of functionality. Key to such components is that they present a programming model with properties, methods, and events; they have attributes that provide declarative information about the component; and they incorporate their own documentation. C# provides language constructs to directly support these concepts, making C# a very natural language in which to create and use software components.

--

Several C# features aid in the construction of robust and durable applications: Garbage collection [...] exception handling [...] type-safe design

--

C# has a unified type system. [...] values of any type can be stored, transported, and operated upon in a consistent manner

--

To ensure that C# programs and libraries can evolve over time in a compatible manner, much emphasis has been placed on versioning in C#’s design. Many programming languages pay little attention to this issue, and, as a result, programs written in those languages break more often than necessary when newer versions of dependent libraries are introduced. Aspects of C#’s design that were directly influenced by versioning considerations include the separate virtual and override modifiers, the rules for method overload resolution, and support for explicit interface member declarations.



来源:https://stackoverflow.com/questions/2926470/c-sharp-language-design-pillars

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!