主题:  微软C#是新一代编程语言吗?

莫特探员

职务:普通成员
等级:1
金币:1.0
发贴:255
注册:2000/9/18 8:38:25
#12000/9/20 16:22:53
电脑报 作者:小三译 03日 15:51

  微软在想什么?C#(发音为C sharp)是微软最新的编程语言。世界真的需要另外一种编程语言吗?我不这样认为。
  
  如果你强调制作速度,可以使用C或者 C++做程序。如果你需要快速开发,可以使用Inprise的Delphi语言开发包。如果你需要数据库接入,你可以学习SQL。如果你想在轻便性上有所创新,可以使用Java。C#? Uh ...让我想想。
  
  微软声称C#不是作为Java的竞争对手出现的。微软分布式平台部门的软件构造师 Andrew Layman表示C#能作一些Java能做的事情,但它不是Java。如果一个产品它看上去象Java,听上去也象Java的话,那它可被视为是Java的衍生技术。
  
  微软现在不能再做Java了,它也不想再做Java了。微软想为开发人员赋予类似的功能,但看着钱往 Sun CEO Scott McNeally的口袋里放可真让Ballmer 受不了。因而C#出现了。
  
  微软表示C#将把C++带往现代世界,但 C#真能这样做吗?微软承认要运行C#应用必须一个虚拟机。答案错误,这不是Java嘛,等等,Java应该是可以到处运行的啊。
  
  C#也不是一个新的概念了,它是Cool的衍生物。 Cool是一套来和Java竞争的原型C++扩展指令。
  
  如果你喜欢为视窗进行开发的话,那C#看上去不错。但当你准备就绪渴望进行开发时,抱歉,你一时半会儿做不到。微软承诺将7月开发商会议上公布的Visual Studio 7测试版中提供C#的阿尔法版本。理论上讲C#将出现在秋末发售的Visual Studio最终版本中。但我估计可能要等到2001年初。
  
  让我们言归正传吧。C#概念的真实目的就是是在微软推出真正的选择方案前使人们远离Java。
 



莫特探员

职务:普通成员
等级:1
金币:1.0
发贴:255
注册:2000/9/18 8:38:25
#22000/9/20 16:25:43
C# Introduction and Overview



新闻内容:
For the past two decades, C and C++ have been the most widely used languages for developing commercial and business software. While both languages provide the programmer with a tremendous amount of fine-grained control, this flexibility comes at a cost to productivity. Compared with a language such as Microsoft?Visual Basic? equivalent C and C++ applications often take longer to develop. Due to the complexity and long cycle times associated with these languages, many C and C++ programmers have been searching for a language offering better balance between power and productivity.

There are languages today that raise productivity by sacrificing the flexibility that C and C++ programmers often require. Such solutions constrain the developer too much (for example, by omitting a mechanism for low-level code control) and provide least-common-denominator capabilities. They don't easily interoperate with preexisting systems, and they don't always mesh well with current Web programming practices.

The ideal solution for C and C++ programmers would be rapid development combined with the power to access all the functionality of the underlying platform. They want an environment that is completely in sync with emerging Web standards and one that provides easy integration with existing applications. Additionally, C and C++ developers would like the ability to code at a low level when and if the need arises.

Microsoft Introduces C#
The Microsoft solution to this problem is a language called C# (pronounced "C sharp"). C# is a modern, object-oriented language that enables programmers to quickly build a wide range of applications for the new Microsoft .NET platform, which provides tools and services that fully exploit both computing and communications.

Because of its elegant object-oriented design, C# is a great choice for architecting a wide range of components-from high-level business objects to system-level applications. Using simple C# language constructs, these components can be converted into Web services, allowing them to be invoked across the Internet, from any language running on any operating system.

More than anything else, C# is designed to bring rapid development to the C++ programmer without sacrificing the power and control that have been a hallmark of C and C++. Because of this heritage, C# has a high degree of fidelity with C and C++. Developers familiar with these languages can quickly become productive in C#.

Productivity and Safety
The new Web economy-where competitors are just one click away-is forcing businesses to respond to competitive threats faster than ever before. Developers are called upon to shorten cycle times and produce more incremental revisions of a program, rather than a single monumental version.

C# is designed with these considerations in mind. The language is designed to help developers do more with fewer lines of code and fewer opportunities for error.

Embraces emerging Web programming standards
The new model for developing applications means more and more solutions require the use of emerging Web standards like Hypertext Markup Language (HTML), Extensible Markup Language (XML), and Simple Object Access Protocol (SOAP). Existing development tools were developed before the Internet or when the Web as we know it today was in its infancy. As a result, they don't always provide the best fit for working with new Web technologies.

C# programmers can leverage an extensive framework for building applications on the Microsoft .NET platform. C# includes built-in support to turn any component into a Web service that can be invoked over the Internet-from any application running on any platform.

Even better, the Web services framework can make existing Web services look just like native C# objects to the programmer, thus allowing developers to leverage existing Web services with the object-oriented programming skills they already have.

There are more subtle features that make C# a great Internet programming tool. For instance, XML is emerging as the standard way to pass structured data across the Internet. Such data sets are often very small. For improved performance, C# allows the XML data to be mapped directly into a struct data type instead of a class. This is a more efficient way to handle small amounts of data.

Eliminates costly programming errors
Even expert C++ programmers can make the simplest of mistakes-forgetting to initialize a variable, for instance-and often those simple mistakes result in unpredictable problems that can remain undiscovered for long periods of time. Once a program is in production use, it can be very costly to fix even the simplest programming errors.

The modern design of C# eliminates the most common C++ programming errors. For example:

1)Garbage collection relieves the programmer of the burden of manual memory management.
2)Variables in C# are automatically initialized by the environment.
3)Variables are type-safe.

The end result is a language that makes it far easier for developers to write and maintain programs that solve complex business problems.

Reduces ongoing development costs with built-in support for versioning
Updating software components is an error-prone task. Revisions made to the code can unintentionally change the semantics of an existing program. To assist the developer with this problem, C# includes versioning support in the language. For example, method overriding must be explicit; it cannot happen inadvertently as in C++ or Java. This helps prevent coding errors and preserve versioning flexibility. A related feature is the native support for interfaces and interface inheritance. These features enable complex frameworks to be developed and evolved over time.

Put together, these features make the process of developing later versions of a project more robust and thus reduce overall development costs for the successive versions.

Power, Expressiveness, and Flexibility
Better mapping between business process and implementation
With the high level of effort that corporations spend on business planning, it is imperative to have a close connection between the abstract business process and the actual software implementation. But most language tools don't have an easy way to link business logic with code. For instance, developers probably use code comments today to identify which classes make up a particular abstract business object.

The C# language allows for typed, extensible metadata that can be applied to any object. A project architect can define domain-specific attributes and apply them to any language element-classes, interfaces, and so on. The developer then can programmatically examine the attributes on each element. This makes it easy, for example, to write an automated tool that will ensure that each class or interface is correctly identified as part of a particular abstract business object, or simply to create reports based on the domain-specific attributes of an object. The tight coupling between the custom metadata and the program code helps strengthen the connection between the intended program behavior and the actual implementation.

Extensive interoperability
The managed, type-safe environment is appropriate for most enterprise applications. But real-world experience shows that some applications continue to require "native" code, either for performance reasons or to interoperate with existing application programming interfaces (APIs). Such scenarios may force developers to use C++ even when they would prefer to use a more productive development environment.

C# addresses these problems by:

1)Including native support for the Component Object Model (COM) and Windows?based APIs.
2)Allowing restricted use of native pointers.

With C#, every object is automatically a COM object. Developers no longer have to explicitly implement IUnknown and other COM interfaces. Instead, those features are built in. Similarly, C# programs can natively use existing COM objects, no matter what language was used to author them.

For those developers who require it, C# includes a special feature that enables a program to call out to any native API. Inside a specially marked code block, developers are allowed to use pointers and traditional C/C++ features such as manually managed memory and pointer arithmetic. This is a huge advantage over other environments. It means that C# programmers can build on their existing C and C++ code base, rather than discard it.

In both cases-COM support and native API access-the goal is to provide the developer with essential power and control without having to leave the C# environment.

Conclusion
C# is a modern, object-oriented language that enables programmers to quickly and easily build solutions for the Microsoft .NET platform. The framework provided allows C# components to become Web services that are available across the Internet, from any application running on any platform.

The language enhances developer productivity while serving to eliminate programming errors that can lead to increased development costs. C# brings rapid Web development to the C and C++ programmer while maintaining the power and flexibility that those developers call for.



莫特探员

职务:普通成员
等级:1
金币:1.0
发贴:255
注册:2000/9/18 8:38:25
#32000/9/20 16:32:46
Sun认为C#不会替代Java


Microsoft(微软公司)说∶C#同Java不一样,将成为一个国际性标准。

  C#同Java较量的第一局比赛已经开始,Sun公司声称Microsoft已经给一个不相关的标准委员会递交了一个另人混淆的、不完善的技术标准。

  Sun公司的工程师们自Microsoft公司于星期一发布了C#标准以来,一直在仔细搜寻C#标准的技术信息,并且宣称C#不可能替换Java。他们说∶因为Microsoft的文件不全面,所以他们不能说清楚C#到底是干什么用的,尽管如此,他们相信C#是"C或者C++的下一代修订版",而这又跟Windows操作平合紧密相关。

  Microsoft产品经理Tony Goodhew承认∶Microsoft公司所呈送的C#在技术上是不完善的。但他说∶正因为如此,业界其它公司可以帮助Microsoft对C#进行定义。他宣称C#将是交叉平台,不仅仅同Windows相关。星期一,Microsoft把C#和CLI(一种通用语言架构,支持C#、ECMASript和其它未特别定义的语言)提交给ECMA。ECMA是设在日内瓦的标准机构,在Sun于三月份撤回Java之前它也考虑将Java标准化。

  Microsoft给ECMA所呈送的报告描述了C#的最初技术规格,但未对CLI技术规格作任何说明。Microsoft希望在10月15日前提交完整的技术草案。Microsoft也提议从现在开始到十一月期间举行五个TC 39会议(TC 39是一个使ECMAScript标准化的技术委员会),之后每一个月再举行一次会议。Microsoft期待着ECMA 综合会议(General Assembly)在2001年12月的会议中批准其C#。

  综合会议每年召开两回,上个星期才结束了一个会议。但Goodhew声称Microsoft没有任何理由这么做,因为没有必要再组成新的技术委员会。他说TC 39对于C#来讲已经完全符合要求,因为TC 39在以前经手过ECMAScript。

  许多经销商、分析人士和开发商正在保留对C#的评价。尽管Big Blue称赞Microsoft给一个标准机构呈送了C#,然而IBM仍未决定是否支持C#。Hurwitz Group相信∶C#将促使Sun开放Java的部分源码并最终将Java提交给某个标准机构。然而VP Evan Quinn说∶如果C#比Java更加先进的话,现在谈C#有什么长处还为时尚早。