Earlier quoted context omitted.
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…
> They were very scared of Java at the time 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 I…
Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
21–30 of 87 posts
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#22I always thought that prior to C# 1.0 being released, the Java language was stuck. There was no generics, annotations, enumerations, for/each loops or auto boxing which made programming in Java not only painful but dangerous (especially with the lack of generics and for/each). I personally, never considered anything before Java 1.5 "good enough".
I was always under the impression that these language change were in response to what C# and many of these language concepts were practically copied from C#. Is this actually the case?
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#23As 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…
I work with both, and while I also don't like the pace Java gets its improvements, I understand them, given how many companies allow us to update to modern versions. 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 t…
This seems to be the dirty little secret of C++ programming. It seems any corporate site that decides to go serious with Object Orientation also decides to do Managed Memory, and switches to Java or C#, and lately maybe even Go.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#24Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#25Microsoft 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.
Java also ended up copying quite a few features of C# back. - Boxing - annotations - StringBuilder - LINQ - var (coming with 10)
Edit: this is not correct. My bad.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#26Java 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…
Such structural grouping of values however went against OOP dogma at the time, which dictated that every type must have a name. Even after generics were introduced into Java, Sun refused to add even a pair class to the JDK (IMHO the bug report was amusing reading). Perhaps they were also similarly opposed to C#'s features?
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#27Microsoft 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.
Java also ended up copying quite a few features of C# back. - Boxing - annotations - StringBuilder - LINQ - var (coming with 10)
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#28Both the languages and platforms are very good. But right now there is more influential OSS (HBase, Cassandra, Kafka and many others) stuff in Java. However, I wonder with Oracle's new stance, if C# will become the preferred language for Open Source. Or Maybe Go will leave both Java and C# behind.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#29I have never really coded in C# or in the .Net platform, but I remember when it came out. I always thought that prior to C# 1.0 being released, the Java language was stuck. There was no generics, annotations, enumerations, for/each loops or auto boxing which made programming in Java not only painful but dangerous (especially with the lack of generics and for/each). I personally, never considered anything before Java…
https://stackoverflow.com/questions/31693/what-are-the-diffe...
https://stackoverflow.com/questions/355060/c-sharp-vs-java-g...
http://www.jprl.com/Blog/archive/development/2007/Aug-31.htm...
http://www.artima.com/intv/generics2.html
https://blogs.msdn.microsoft.com/ericlippert/2009/07/30/what...
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#30It is an open platform. You are just as productive as a developer on Unix and Mac OS X as you are on Windows. The "toolchain" with things like Maven, build and dependency management, is well-defined and not buggled into a big IDE like it is on C#.
Deploying on Unix is a standard thing, not an experimental feature. And finally there is Android.
Sure Java as a langage is more conservative but the differences are not that big. And there are alternatives like Scala or Kotlin for those want and they seem to be a minority.