Why did Microsoft Create C#?
I read great posts recently from Rafael Teixeira and Dan Shappir related to a question on Quora, “Why did Microsoft create C#.” This dovetails nicely with my prior post, Top 5 Reasons to Program using Xamarin. Dan taps into the business motivations behind Microsoft’s decision to create C# and .Net. Rafael touched on more of the promise that developed through Mono. I recalled more of the emotional response at the time.
What is the difference?
C# is one language build on top of the Microsoft .Net Framework. The .Net Framework was something of a joke in its first release. It was clearly inspired by and meant to compete with Java. Java was a popular language and Microsoft was losing developers to other platforms. As Dan points out, Microsoft tried to make Java their own. When that failed, they resorted to developing a replacement language, C#.
C# was inspired by Java. But the underlying framework was very different in approach. Java is one language where apps are written once to run anywhere provided the right runtime environment is installed on the client machine. The Microsoft’s .Net Framework can interpret many (Microsoft) languages into one Windows app. Microsoft’s .Net was like Java reversed.
Hope versus reality
Java brought the hope of writing an app once and running it on any platform. In practice, the experience has left something to be desired. First, you have the challenge of making sure the client has a copy of the right Java Runtime Environment. Too recent, and some of your code dependencies may have been deprecated. Too old, and some of your code dependencies may not be present. Not to mention, Java was naturally slow. Today’s Java apps written for Android can only run on an Android device.
Ironically, Microsoft .Net turned out to be better suited to cross-platform development in the long run. Thanks to Miguel de Icaza, we have Mono which eventually enabled Xamarin. With Xamarin, you can write one app in C# and compile to run natively on any Windows, Android, or iOS device. The customer experience is maintained and performance is consistent. C# has become what Java hoped to be.
For More Information
If you would like to learn more about programming in C# and Xamarin, then you can find a wealth of information at https://www.xamarin.com. Do you like what you read? If so, subscribe below to receive more great content. Share with your friends and leave feedback below.
Leave a Reply