Windows DevCenter    
 Published on Windows DevCenter (http://www.windowsdevcenter.com/)
 See this if you're having trouble printing code examples


News -- C# is Pronounced 'See Sharp'

by Arthur Griffith
07/01/2000

Among the new technologies announced by Microsoft in June, and scheduled to debut at the Microsoft Professional Developer's Conference (PDC), is a new programming language called C#. C# (pronounced "See Sharp") is scheduled to be included with the next release of Microsoft's Visual Studio .NET programming environment. Modules written in C# will be compatible with those written in Visual C++ and Visual Basic, allowing true cross-language development on Microsoft .NET platforms for the first time. Early beta testers have had access to a command line version for several weeks. C# is best described as a response to the productivity needs of .NET web application and services developers in the same way that Visual Basic responded to the needs of Windows Developers in the 90s.

Modern programming languages are not hatched in a vacuum; they are created out of the experience and knowledge of their designers. And, the more people involved in a design, the broader the base of languages and experience from which to draw. It is also inevitable that any new language will rely heavily on the designs of previously successful languages.

Microsoft says that the C# language definition has been primarily derived from C and C++, and many elements of the language reflect that. C# is broader than Java in what its designers chose to inherit from C++ (such as structs), and it also adds new features of its own (such as source code versioning).

But C# is more like Java than anything else, in spite of Microsoft's silence on the subject. This is to be expected, I suppose, given the recent success of the latter and the gains in productivity over C++ that have been reported by the companies that use it. As for the politics involved, I will leave that to others. I want to talk about the language itself.

To help make sense out of all this, I have broken down the features of C# into those that are distinctly Java-like, those that have derived from standard C and C++, and those that are brand new in C#. As you will see, however, many of the features that C# has derived from these languages have taken on a C# cast of their own. This list is not meant to be an exhaustive treatment of C#, but it should give you a pretty good idea of its structure.

C# Features Derived From Java

C# Features Derived From C and C++

Features Unique to C#

Conclusion

Any experienced Windows programmer is certain to find something to like in the list of C# language features. I particularly like the properties and the indexing capabilities of the language. I also like the concept of delegates because whenever I am developing code I feel alienated from the event process. The delegates could make it all more accessible.

There are some features in the list that were new with Java, but will undoubtedly be with us in computer languages from now on. The fixed-size data types (that is, a 32-bit int and a 64-bit long) lend themselves not only to great portability, but they simplify programming because you always know exactly what you're dealing with. And, of course, once you have worked with a language that uses automatic garbage collection, you will forever miss it when you don't have it. In the same way, I think some of the new features of C#, such as indexers, properties and versioning, will be successful enough to become part of programming languages of the future.

While the language described in the released C# specification and other press materials seems complete, Microsoft has so far remained silent on the underlying framework and base class libraries needed to make C# the equal of C++ or Visual Basic. Windows programmers have been asking for years for a clean object oriented interface to the Windows 32 APIs and many of the newer facilities that have been added to the Windows 32 operating system, such as the XML parser and COM+ services. A preview of what might be in store can be seen in the WFC class libraries released with the Visual J++ tool, now largely forgotten as a result of the Sun and Microsoft court battles. Perhaps we shall hear more this coming week at the PDC.

On the whole, however, I like the design of C#. If a good implementation follows, then I think .NET platform developers will find themselves gravitating to this new tool as they work their way through lengthening lists of programming tasks in the brave new world of n-tier web application programming.

Arthur Griffith is a former programmer and compiler writer.

Copyright © 2009 O'Reilly Media, Inc.