Live data from Hacker News

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

quora.com

61–70 of 87 posts

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

#61

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…

>Hejlsberg got to look at the weakness of Java to make C#. Not only that, but Sun actually had a culture of refusing to look at what other companies like Apple and Microsoft had done because of their pre-conceived notion that it was inferior, and proudly scoffing at and ignoring other technology instead of carefully studying it and learning from its strengths and weaknesses like Microsoft shamelessly did. When I work…

Macs were considered useless toys

And then Apple supplanted Sun as the biggest Unix workstation vendor on the planet, pretty ironic!

Back in the 90s I did most of my Java on Mac, using the excellent Metrowerks Codewarrior environment. It was considerably more productive than NetBeans (or whatever it was called then, I forget) on the Ultra-10 I also had on my desk. Writing was on the wall for Sun even then...

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

#62

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…

I’m sure it’s a slip of the tongue, but you don’t mean Bill Joy but rather Jim Gosling.

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

#63
post #47

Earlier quoted context omitted.

Java is the primary development langauge for Android. You can't really compare that to the stuff you are listing. Can I run Visual Studio on my macbook? Does any of the companies developing webapps in C# actually deploy on Unix? MS might aspire to have that broadness of platform but it is not actually there. It is in the Java world.

> Can I run Visual Studio on my macbook? Visual Studio Code, yes. People do that. I see it at my employer. But ultimately it's not tied to a particular IDE. You could e.g. use JetBrains Rider (1) on your mac. You could use the likes of Sublime text, the command line tools and a plugin (2) if you want. > Does any of the companies developing webapps in C# actually deploy on Unix? Some of them do yes, and more of them w…

Vscode is not vs.

I didn’t want to go into a detailed argument. Just look at the broad lines of what happens in practice. On one side you have a diverse environment with different development machines, deployment machines and so on. On the other side you don’t have diversity. It is as simple as that.

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

#64
post #50

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…

I wonder if we are not close to the end of C#’s useful life. It’s a great language but it has become so convoluted with dozens of way to do the same thing, largely due to improvement that came along the way. Like methods accepting objects coexisting along methods accepting generics. Old async syntax (callbacks) along task async, like out and ref parameters now that we have valuetuples, etc. I wonder if .net core isn’…

I think C# is lucky in a way. It's getting old and bloated at a moment in history when modern is essentially synonymous with being a convoluted multi-paradigm monster gobbling up features and syntactic sugar at a frantic pace.

Even the Go crowd has made the first step towards quantum computing, leaving behind errno in favor of returning both a possibly invalid return value and an error that can be nil and non-nil at the same time! ;-)

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

#65
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…

For me the highlights of C# 1.0 vs Java at that time was

multiple classes per file or partial classes in C# vs Java's one file=one class

Easy default way to build, debug and run apps

Familiar way to create GUIs

ASP.net (it wasn't perfect but hey) compared to JSP

No properties boilerplate

Enums

Visual Studio 2003 vs Eclipse or Netbeans at that time on the hardware at that time was no competition

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

#66
post #40
post #15

Earlier quoted context omitted.

> (Tuple unpacking is the clean way, but that has only recently been added.) 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 tha…

The logic behind Java is that the language should not concern itself with technicalities, the JVM will take care of it. This principle goes both ways, the JVM can't optimize your code if you have already decided how it should behave. As i understood, that is why they never added the more technical features as MS did in C#. In principle if you want to return multiple values from a method, you can return them in an arr…

Optimization is not the issue. It is not possible in a strongly typed language to return multiple heterogeneous values in an array. That is why we have tuples.

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

#67
post #50

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…

I wonder if we are not close to the end of C#’s useful life. It’s a great language but it has become so convoluted with dozens of way to do the same thing, largely due to improvement that came along the way. Like methods accepting objects coexisting along methods accepting generics. Old async syntax (callbacks) along task async, like out and ref parameters now that we have valuetuples, etc. I wonder if .net core isn’…

I think the opposite is true.

First, the backwards compatibility is a key feature. You can open a project written several years ago, and add a new feature to it using the latest language syntax without being forced to rewrite all the old code.

I'm not quite sure about stock visual studio (since I don't use it), but Resharper (and their new Rider IDE, which I've played with a bit) is pretty good at highlighting code doing things the old way and even automatically rewriting it for you. This seems to be getting better as they take advantage of what the Roslyn compiler can help with.

.NET Core, native, and the work of Xamarin only means more cross platform support, which allows broader use beyond just the Windows world. The ecosystem is starting to get caught up now, and between most popular libraries being available and the feature parity reached with .NET Core 2.0, things are looking great for it to grow even more popular.

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

#68
post #21

Earlier quoted context omitted.

> 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…

I'm one of those who prefer HTML/CSS/JavaScript to Java applets! It is interesting that MS for a while heavily pushed JavaScript and dynamic HTML in order to undercut Java...until they belatedly realized they had creating something which was just as bad to the Windows lock-in.

The irony is that Applets are back, now they are called WebAssembly.

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

#69

C# and Java. From Open Source standpoint and with Android adoption Java was/is ahead. However, things are changing again. Oracle has announced that they will give free support to Java releases only for six months. It makes JVM a risky, unstable and potentially unsafe platform to develop on. On the other hand, MS is putting a lot of effort to make C# open and to make it run on all platforms. Both the languages and pla…

That is not correct, 6 months support is for the releases that aren't LTS. LTS releases are three years.

Without generics, GUI toolkits, good quality SQL drivers from the vendors themselves, enterprise frameworks and the IDE quality of Java and C#, Go will never be an actual threat to them.

Go 2.0 might be, if it ever happens.

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

#70
post #65
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…

For me the highlights of C# 1.0 vs Java at that time was multiple classes per file or partial classes in C# vs Java's one file=one class Easy default way to build, debug and run apps Familiar way to create GUIs ASP.net (it wasn't perfect but hey) compared to JSP No properties boilerplate Enums Visual Studio 2003 vs Eclipse or Netbeans at that time on the hardware at that time was no competition

Mostly agree, but partial classes were a far later addition
Post reply on HN