Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
71–80 of 87 posts
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#72C# 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.
According to Wikipedia [2] same period for JDK 7 to JDK 8 was 1 year. Also on the same Wikipedia page, you can see how many bugfixes JDK 8 received in that 1 year.
So JDK8 to JDK 11 release is also going to be a little bit risky as people will need to depend only on 3-4 months stability reports to upgrade their production deployments to JDK 11.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#73Java 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…
Surely the "clean" way to return multiple values from a function is to support returning a tuple. The methods positional parameters already essentially constitute a tuple argument. 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 re…
You're passing along a variable which is then overwritten in the method to serve as a return value. Essentially just a somewhat formalized use of side effects.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#74Earlier quoted context omitted.
>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...
Netbeans was always called like that I think. I just remember before version 3.0, the UI was quite different, and there was this strange concept of having to mount directories to see them on the IDE.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#75Java 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…
Given C# designers, the goal was always to have a safe language, with enough features to go the extra mile in performance without necessarily being forced to use something else.
Something that Java designers are now catching up with, but we still need to wait a couple of years before Valhalla, Pananama and Metropolis are finally here.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#76Earlier quoted context omitted.
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.
Only the companies that are willing to sponsor ANSI C++ work, do have anything to say to what happens to C++, same applies to any other ANSI language, including C.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#77I 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…
In the case of generics, C# got them right (but required changes to CLR 2.0) and then Java tried to copy the idea (without requiring any changes to the JVM) but fucked them up. Look up "type erasure": Java's underlying compiled classes weren't actually generic, and generics compiled down to "Object" and casts (which are less efficient, and can be subverted at runtime). Generics were implemented by the Java compiler,…
http://pizzacompiler.sourceforge.net/
But then only part of it was taken back into Java.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#78Earlier quoted context omitted.
> It is an open platform. You are just as productive as a developer on Unix and Mac OS X as you are on Windows. How is that any different from .Net core? Open platform, check (1) productive on those platforms, check (2) > buggled into a big IDE like it is on C#. Nope. dotnet cli is fine standalone (3) > Deploying on Unix is a standard thing, not an experimental feature. Um, it might be fairly new but I would not call…
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.
Kind of.
First Google pulled an old style Microsoft move, by only implementing what they cared about.
With Android Oreo, they finally added proper support for most of Java 8, but given the fragmentation history, one only gets to use it fully when targeting Oreo or better devices.
Then now with Kotlin adoption, their silence on Java 9 support and the 6 months release plan for Java, I have this feeling Android will be stuck at the current level of Java 8 support.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#79As 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…
As a sidenote: Microsoft actually willfully copied some of those to their side, too (e.g. covariant arrays).
Having worked with C++ (which has its own set of problems, of course), I repeatedly find language design decisions that strike me as inelegant hacks in both of them (getting rid of `const`, for example).
From today's perspective, I'd say that the biggest contribution both languages have made for the future are their respective runtimes and that they allow new languages to adopt those (Clojure, Scala, Kotlin, F#...) without having to throw away all of your codebase at once.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#80Earlier quoted context omitted.
> 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.
But did you miss the three other development options listed for .Net on mac? : Visual Studio For Mac, Jetbrains Rider, and bring your own editor.
> didn’t want to go into a detailed argument. It is as simple as that.
Things are usually only simple from a distance. How much time have you spent up close to .Net in the last 2 years?
For my part, I have spend no time close to Java lately, and that is why I don't hold forth strong opinions about Java: because I would be a fount of ignorance. I'd rather listen to those who have more experience with it.
> On the other side you don’t have diversity.
That might have been universal a while back, but it really is not any more. Facts have been laid out above and you keep repeating your assertion. It's just prejudice. Is this something that you want to be true?
Look, the .Net ecosystem is changing for very valid reasons, and in a great direction. It has changed a lot at a sustained pace over the last few years, and that will not stop. Some employers and industries have not changed yet, and that's fine, many places are happy in their niche, be it .Net and Windows or Java and Linux. However your universal assertions are outdated, and will be increasingly irrelevant.