C#语言设计的支柱 [英] C# language design pillars

查看:130
本文介绍了C#语言设计的支柱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文章(http://www.artima.com/intv/ nonvirtualP.html)安德斯·海尔斯伯格提到的版本是C#语言设计的支柱之一。有谁知道什么是其他支柱?


解决方案

我是指你一页的C#规范,它描述的重要因素是走进语言的设计。这说明什么的一些重要因素,并不断有几个报价为:




现代,面向对象和类型安全




-




立即熟悉C,C ++和Java程序员。




-




当代软件设计越来越依赖软件组件在功能自包含和自描述包的形式。这种组件的关键在于,它们的编程模型与属性,方法和事件;它们具有提供了关于组件的声明信息的属性;他们结合自己的文档。 C#提供的语言构造直接支持这些概念,这使得C#中创建和使用软件组件是很自然的语言




-




若干C#特性在坚固耐用的应用援建:垃圾收集[...]异常处理[...]类型-safe设计




-




C#有一个统一的类型系统。 [...]的任何类型的值可以被储存,运输和操作时以一致的方式




-


要确保C#程序和库能够以兼容的方式随着时间的推移,大部分重点一直放置在C#的设计版本。许多编程语言不太重视这个问题,并且,其结果是,这些语言编写的程序依赖的库的更新而不是必要的突破更频繁。即直接通过版本控制因素的影响的C#的设计在某些方面,其中包括单独的虚拟和override修饰符,方法重载决策规则以及对显式接口成员声明的支持。



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?

解决方案

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.

这篇关于C#语言设计的支柱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆