Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
11–20 of 87 posts
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#12Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#13As 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…
My work computer has Java 9, .NET 4.7.1 and C++17 compilers installed.
Usually I get to deploy on Java 8 (only allowed last year), .NET 4.5 (as of last year) and C++ enterprise code looks mostly C with C++ compiler.
So I don't mind the slow pace, given that I can only use the very latest features on private projects.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#14Java 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…
That is what appealed to me back then.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#15Java 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 be…
Oh, I agree with you there, but that doesn't change the fact that ref/out parameters were a much, much better than the way Java forced you to do it. I don't mean to imply that C# 1.0 was a good language even for the 90s, but it was a big practical improvement over Java.
I think C# 2.0 is the first point where someone could make the claim that it was actually a good language, at least for that era.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#16Java 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?
#17Java 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 be…
This is an understatement, reading some of the antitrust documents you can clearly see that Microsoft was afraid that Java's ability to create rich programs that run regardless of OS would end up making Windows unnecessary since it wouldn't matter what OS you had. They saw Netscape as a distribution vector for Java and the JVM and was an important reason for why they made IE (one could say "and ActiveX" but that was already a thing they had anyway).
And FWIW i think they were partially successful in that their own MS Java did kill Java on the desktop and browser (the startup performance of Sun's runtime was also a factor, but the main thing i always remember developers being concerned around the turn of the millennium was compatibility with the VM that everyone had - the MS Java - both in terms of supported APIs and in terms of runtime performance - MS Java was way slower and contributed extensively to the idea of Java being slow).
Of course they failed to avoid making Windows unnecessary for a large number of applications, but instead of Java it was HTML, CSS and JavaScript. If that is a better alternative... well, i'm sure there are people who prefer it this way.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#18Microsoft got sued by sun so they got rid of their VM and made C#. C# copied java, but its evolved and now has a lot of cool features.
- Boxing
- annotations
- StringBuilder
- LINQ
- var (coming with 10)
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#19They 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…
https://www.youtube.com/watch?v=ZYw3X4RZv6Y&feature=youtu.be...
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#20Java 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 had always assumed that, initially, Sun was distracted by the Oracle acquisition. But there's also a philosophical / design principle in Java which tends towards being conservative about what features they add, for instance see this discussion thread [1,2] about adding a Pair class into java.util. Given the wide deployed footprint of Java across platforms, one can even sympathize with this.
There is also the central Java philosophy (which also influences the Pairs/Tuples discussion) that "names matter"[3]. I would argue that in my experience, in some contexts, especially in the server-side enterprise context where Java is very popular, names don't always matter, which is why developers keep asking for Pairs and Tuples and keep complaining about Java's verbosity -- because Java forces them to care about things they don't really care about (another great example is checked exceptions).
C# to me is like a "mirror universe" Java, where the underlying philosophy is to add features if they make a developer's life simpler. As a result, C# "feels" nicer to use and in the right hands can result in (subjectively) nicer code. In JVM land, this also explains why so many developers like Kotlin.
In reality, developers can write unreadable code in both languages. Although my main criticism of Java is that they probably shouldn't be that dismissive of Lisp, there are some good ideas there, as Kotlin has been demonstrating :-).
In any case, Java is now on a rapid-release cadence[4] where we should see more "features" added on a regular basis.
[1] http://mail.openjdk.java.net/pipermail/core-libs-dev/2010-Ma... [2] http://mail.openjdk.java.net/pipermail/core-libs-dev/2010-Ma... [3] http://cr.openjdk.java.net/~briangoetz/amber/datum.html [4] https://www.infoq.com/news/2017/09/Java6Month