Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
From the author of

Why Do We Need a New Programming Language Like C#?

You've heard the saying that genius is a good idea standing on the shoulders of the great ideas. C# is ingenious like that. Microsoft hired architects who had demonstrated a gift for designing software languages and frameworks, and gave these people a charter I imagine that went something like this: Build a language that is powerful, expressive, and uses the best language capabilities to date; but make it harder to write bad code and leave out stuff that gets programmers into trouble.

I can only imagine the conversation because I wasn't at that meeting, but this describes the language we have in C#. The .NET framework encompasses garbage collection to help avoid memory leaks. As a consequence, every .NET language, including C#, inherits garbage collection. C# eliminates pointers, addresses, templates, and multiple inheritance—language idioms that have been mal-used and can cause programs to behave unreliably. C# is object-oriented like C++, and it has a syntax that is closest to C/C++. A C-style grammar was probably chosen to avoid competing directly with Visual Basic and to target the widest possible adoption. (Most programmers had some C programming in college.)

Another reason Microsoft invented a brand-new language is in part likely related to Sun's lawsuit. I don't recall all of the details but the gist of the lawsuit seems to have been to prevent Microsoft from extending Java. (So much for Java being an open source language company.) More important, Microsoft is a software company, and it has shown tremendous leadership in building, extending, and integrating new technologies. This is what it does.

  • + Share This
  • 🔖 Save To Your Account