The words open and Microsoft Corp. are rarely seen together. In server operating systems, Web browsers, programming languages, and countless other areas, Microsoft has proven that it needn't embrace openness to be successful. What, then, would possess the world's most infamously proprietary software vendor to dream up a marvelous programming language only to give it away to a public standards body?
Microsoft developed the C# (C Sharp) language. It created just-in-time C# compilers and a rich layer of standard data types and services it calls the Common Language Infrastructure (CLI). The combination of C# and the CLI, as packaged in June's beta 2 release of the .NET software developer's kit, supports the creation of text and graphical applications, server-side Web apps, components, and Web services. Most of this functionality has been submitted to the European Computer Manufacturers Association (ECMA) for standards consideration, effectively granting everyone the right to come up with C# compilers and CLI implementations of their own.
Assuming Microsoft follows through, C# will enjoy the kind of universal portability promised by Java but without restrictive license terms. In turn, business will have a new, powerful, and appealing programming language at its disposal. Conceivably, Microsoft could still withdraw C# from the standards process, but it isn't likely.
C# follows the time-honored Microsoft practice of invention through improvement. C# weaves together the best traits of C++, Java, JavaScript (now ECMAScript), and Visual Basic (VB). C#'s varied lineage makes it elegant, safe, and easy to learn. The language alone isn't enough to make an application: The accompanying CLI ensures that all C# programs will have a standard set of data types and classes covering everything from output formatting to network I/O.
As did VB before it, C# acknowledges that not all software is written by wizard-level programmers and sloppy code is inevitable. C++ is notoriously unforgiving of bad, hurried, or naively crafted programs. In contrast, Visual Basic has always given novice and intermediate programmers a safe place to work.
C++ programmers envy VB, but not for its safety. Microsoft wired an understanding of COM (Component Object Model) directly into VB. The company made many attempts to simplify C++ developers' access to COM, but Microsoft was not free to add keywords to the standardized C++ as it did to its proprietary dialect of Basic.
Reason suggests that C++ developers craving VB's ease-of-use could simply switch to VB, but most programmers won't code in what they consider a lesser language. C++ developers will learn and use C# because it retains the C++ features they admire most.
Eventually, C# will replace C++ for most Windows development, including commercial applications. C# is much cleaner than all the Windows and COM layers Microsoft has added to C++.
Some of the features that made VB so easy to learn have been shelved to make VB 7 (the version in Visual Studio.NET) compatible with the CLI. Merely competent VB programmers, along with their applications, won't pass muster under the stricter coding rules imposed by VB 7.
Microsoft's CLI is a key part of .NET. It standardizes data types so that all CLI-compliant software, regardless of programming language or platform, can share data without subjecting it to compute-intensive, error-prone translation. The CLI's closest relative is the Java Runtime Environment and its standard classes, but the difference is key: The CLI is built to support any programming language. Programmers involved in a project can code in the languages they like best. This will be a boon to distributed projects that combine the work of geographically dispersed developers.
The CLI makes code reuse much simpler. Code modules (called assemblies) for an application need only be copied into the application's main directory. There is no registration process and no need to copy assembly location data into Active Directory or the Windows registry. These can't be requirements because the CLI is designed to be hosted anywhere, on any OS. A central repository holds assemblies that are used by multiple applications, but again, no registration is required. The CLI locates the needed assembly at run time.
C# and the CLI have much to recommend them, but perhaps the most compelling reason to use them is that when the ECMA's work is done, Microsoft will not own C# or the CLI. Microsoft will have its own implementation, but plenty of other companies will as well. Perhaps a version will even compete with Microsoft's version. Promoting public standards based on its inventions isn't the embracing of standards or open source that some demand of Microsoft -- that would be revolutionary. But C# and the CLI are meaningful steps in the right direction.
What's open got to do with it
If you view Microsoft's interest in the standardization of the C# language and the CLI with skepticism, you're not alone. Critics assume that Microsoft has some dreadful surprise in store. After all, this is valuable intellectual property Microsoft is planning to give away. Can companies make policy, betting on Microsoft following through with standardizing C# and the CLI?
We think they can. Standardizing these inventions will help soften Microsoft's most hard-core critics: the teens and college students who will be tomorrow's IT decision-makers. Some of the open-source folk most antagonized by Microsoft's rhetoric will be writing C# compilers, CLI implementations, and applications that use them. By design or not, everything they write will run under Windows.
Microsoft always has been willing to give away a tie to sell a suit. In this case, C# and the CLI are the tie and the suit is Visual Studio.NET. Microsoft is betting that anybody who takes to C# will be drawn to the revamped, more powerful Visual Studio IDE (integrated development environment).
Microsoft also has the chance to make Sun look like an enemy of open software, and frankly, it is a rare triumph of Microsoft's geeks over its suits. Andrew Clinick, chair of the ECMA committee examining C# and the CLI, helped bring about the ECMAScript standard. We're confident that Clinick and others responsible for the C# and CLI technology are committed to seeing it become a standard.
THE BOTTOM LINE: C#
Executive Summary: The C# language and the accompanying CLI are key to .NET and the future of Windows development. As they are on the ECMA standards track, non-Windows implementations are likely to appear.
Test Center Perspective: To reap the portability benefits of .NET and the code safety advantages of C#, consider migrating key C++ projects to C#. Bottom-rung VB developers won't be able to abide by the CLI's stricter coding rules. Those who can, should be urged to use the more elegant C#.