C#: A language alternative or just J--?, Part 2

The semantic differences and design choices between C# and Java

1 2 3 Page 3
Page 3 of 3

Standards are not open simply because their specifications are openly available (or, as in the case of ISO, available for a price). True open standards, like XML, are developed openly and collaboratively and often by competing interests. Those whose designs begin proprietarily become true open standards only when the technology originators have no special place at the table in the standards organization.

For example, Microsoft and Sun are both leaders in the development of XML technology, yet they will have to compete with everyone else on the basis of technical excellence, since the standard was developed in full public view. While other languages such as C and C++ were initially developed behind closed doors, the standards process effectively made them common property, in spirit if not in practice. The same cannot be said for Java, since Sun has retracted its bid for standardization. We'll see what ECMA will do about C#.

Closing remarks

If I were a Windows developer, I would be rejoicing at the creation of C#. It is much easier to use than C++, and yet is more full featured than Visual Basic. MFC programmers, in particular, should flock to this tool. It seems likely that C# will become a major language for developing under the Windows platform. Because of C# creator Anders Hejlsberg's excellent track record, I expect the language to live up to its promises, assuming that Microsoft delivers an implementation that does so. C# solves most of the same problems with C++ that Java solved five years ago, usually in the same way. C# also solves the business problems that Microsoft encountered when it found it could embrace and extend Java, but not extinguish it. And, if Microsoft marketing is to be believed, COM will finally be usable. C# itself is not particularly innovative: there is little in this language that has not been seen before. Still, its skillful combination of these well-understood features will provide good value to Windows programmers. Of course, those not wanting to limit themselves to Windows can still choose from among the many excellent implementations of Java for Windows.

Because of its lack of platform neutrality, C# is in no way a "Java killer." Even leaving aside Sun's five-year head start, and Java's successful capture of the "gorilla" (market-owning) position among enterprise server languages, C#'s Achilles' heel is that it is tied to Windows. Of course, in theory it isn't. But widespread cross-platform implementation of C# is like widespread multivendor implementation of Win32 and COM: possible, in theory.

High-technology consumers today, and especially IT managers, are appropriately wary of vendor lock-in. Encoding procedural information assets in a way that ties them to a particular vendor is a Faustian bargain. The Java platform is neutral with respect to operating systems. If you don't like the service you are getting from one vendor, or if your needs change, you can find another vendor that better meets your requirements. It will be some time before that can be said of C# or .Net. In short, while C# is a fine language for Windows programming, it will be able to compete with Java only when C# is freed from its Windows dependence. For the time being, C# users still won't get to decide where they're going today.


Many thanks to fellow ITworld.com author Michael Perry, who performed the technical review for this series, caught several potentially embarrassing mistakes for me, and tried his best to rein in my unruly opinions. Be sure to see Perry's article, as well as my discussion with him about C# versus Java, in Resources.

Mark Johnson is a writer, a consultant, and a JavaBeans columnist and XML guru at JavaWorld. His interests include design patterns, structured data representation, software architecture, enterprise data systems, and codeless software development. He is the president of elucify technical communications (etc), a Colorado-based corporation dedicated to clarifying novel or complex ideas through clear explanation and example. His client list currently includes Sun Microsystems, where he is a contract technical writer.

Learn more about this topic

1 2 3 Page 3
Page 3 of 3