Live data from Hacker News

Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

quora.com

1–10 of 87 posts

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#2
They created Visual J++ because Java scared them and also because Java didn't work very well with Windows. Sun Microsystems sued them and Microsoft had to deprecate Visual J++ and its runtime.

They created C# because they wanted a native language for their .NET runtime that integrated seamlessly with Windows. It was obvious that cross platform runtimes were going to be the future and Microsoft couldn't depend on an outside company to drive the technology platform they would be relying on.

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#3

They created Visual J++ because Java scared them and also because Java didn't work very well with Windows. Sun Microsystems sued them and Microsoft had to deprecate Visual J++ and its runtime. They created C# because they wanted a native language for their .NET runtime that integrated seamlessly with Windows. It was obvious that cross platform runtimes were going to be the future and Microsoft couldn't depend on an o…

Also I understand they wanted to use it for all sort of windows internal libraries (which they ultimately did with .net). I can understand why they would want full control of it.

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#4
Java most definitely was not good enough in the 1990s. It's true that C# 1.0 was very close to a Java clone it still added a couple of very nice improvements such as value types and ref and out parameters making it much easier and cleaner to return multiple values from a method. Features like these didn't add much complexity to the language, and greatly improved the ergonomics. Sun could have (and should have) copied them in Java, and I don't know why they didn't.

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#5

They created Visual J++ because Java scared them and also because Java didn't work very well with Windows. Sun Microsystems sued them and Microsoft had to deprecate Visual J++ and its runtime. They created C# because they wanted a native language for their .NET runtime that integrated seamlessly with Windows. It was obvious that cross platform runtimes were going to be the future and Microsoft couldn't depend on an o…

IMO, it's pretty straight-forward. They created it because of Java. If Java doesn't exist, C# doesn't exist.

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#6

They created Visual J++ because Java scared them and also because Java didn't work very well with Windows. Sun Microsystems sued them and Microsoft had to deprecate Visual J++ and its runtime. They created C# because they wanted a native language for their .NET runtime that integrated seamlessly with Windows. It was obvious that cross platform runtimes were going to be the future and Microsoft couldn't depend on an o…

IMO, it's pretty straight-forward. They created it because of Java. If Java doesn't exist, C# doesn't exist.

They also didn't own or control C++. Ownership is extremely important for market control.

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#7

They created Visual J++ because Java scared them and also because Java didn't work very well with Windows. Sun Microsystems sued them and Microsoft had to deprecate Visual J++ and its runtime. They created C# because they wanted a native language for their .NET runtime that integrated seamlessly with Windows. It was obvious that cross platform runtimes were going to be the future and Microsoft couldn't depend on an o…

Yep, that's how I see it, too.

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#8
post #4

Java most definitely was not good enough in the 1990s. It's true that C# 1.0 was very close to a Java clone it still added a couple of very nice improvements such as value types and ref and out parameters making it much easier and cleaner to return multiple values from a method. Features like these didn't add much complexity to the language, and greatly improved the ergonomics. Sun could have (and should have) copied…

I know the general answer to that last statement had always been that Sun was also a slave to the JCP - they put a lot of control in that group. Oracle quickly dismantled that and is now actually improving the language.. however it seems to be losing ground anyway with people embracing other tech for the server now.

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#9
post #4

Java most definitely was not good enough in the 1990s. It's true that C# 1.0 was very close to a Java clone it still added a couple of very nice improvements such as value types and ref and out parameters making it much easier and cleaner to return multiple values from a method. Features like these didn't add much complexity to the language, and greatly improved the ergonomics. Sun could have (and should have) copied…

Java wasn't good enough...but that was not the reason MS created C#. They were very scared of Java at the time, and their attempt to "embrace and extend" failed. So they created their own language.

Out and ref was not a clean way to return multiple values - they are actually a pretty ugly way to return multiple values. (Tuple unpacking is the clean way, but that has only recently been added.) Out and ref was added because C++ API's had call by reference, and MS wanted to make integrating with windows API's easier. I suspect value types (structs) were added for the same reason.

That said, C# did end up a much better language than Java, especially with later improvements like generics and Linq.

Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?

#10
As someone who has worked with both Java and C#, I would say while Java might have been "good enough" it's lacking when compared to C# across the board. Microsoft has consistently improved the language ahead of Java, with new technology like generics (or properties, but you could argue about that one). Also, the development environment for C# is much better than whatever you can cobble together for Java.

I think much of the difference comes from the nature of the language designers and the timing of the language's creation. Joy had the handicap of going first, and Java has some choices that reflect that. Hejlsberg got to look at the weakness of Java to make C#. Overall, I think the practical approach to C# makes it a more useful language than Java, where Joy has some definite philosophical baggage he's carrying around that is reflected in Java.

Note we're talking a fairly fine gradation here. If you need to work in either, you're not slumming.

Post reply on HN