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’…
Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
51–60 of 87 posts
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#52Earlier quoted context omitted.
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’…
If .net broke backwards compatibility it would be even harder for it to gain traction. See python 2 -> 3 etc.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#53Earlier 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.
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 will. AWS Lambda functions too. (3)
I see both of those (.Net core web apps and lambda functions) at my employer.
> MS might aspire to have that broadness of platform
Correct, this a fairly new aspiration
> but it is not actually there.
You know, it's ok to say "I don't actually know that particular technology very well, I'm not keeping up to date with recent developments in that space." Nobody tracks everything. You don't have to make strong statements about things that you don't know much about.
1) https://www.jetbrains.com/rider/
3) https://aws.amazon.com/blogs/developer/aws-lambda-net-core-2...
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#54Earlier 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…
This is not viable. If I want to return e.g. an (error) code and string, the only Array you can put that in is an array of the root type (Object), losing all type-safety.
In C# and Scala multiple return values use a Tuple class, with some syntactic sugar to easy create and read them. It will eventually be in Java [1], it just takes decades.
It also has very little to do with the optimizer, there's not reason why the JVM couldn't support & optimize it.
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#55Earlier 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.
There is Visual Studio For Mac [1], though I'm unsure how it compares to Visual Studio "proper".
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#56As 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’…
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#57Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#58Earlier quoted context omitted.
Java also ended up copying quite a few features of C# back. - Boxing - annotations - StringBuilder - LINQ - var (coming with 10)
How does Java linq look like?
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#59I 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,…
Re: Why did Microsoft create C#? Wasn't Java good enough in the 1990s?
#60Microsoft created J++ which was Java but with extensions that only worked on Windows. In Visual Studio, these extensions were enabled by default so programmers were unwittingly writing software that only worked in Windows thinking they were writing cross platform Java code. This was a very sneaky move that went totally against Java's write once, run anywhere moto. Microsoft was sued and a judge ruled against them. Th…