They 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 outside company to drive the technology platform they would be relying on.
Also I understand they wanted to use it for all sort of windows internal libraries (which they ultimately did with .net). I can understand why they would want full control of it.
Actually they at least control the C++ improvements that they are able to drive through the ANSI C++ work.
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.
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 them in Java, and I don't know why they didn't.
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.
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 because C++ API's had call by reference, and MS wanted to make integrating with windows API's easier. I suspect value types (structs) were added for the same reason.
That said, C# did end up a much better language than Java, especially with later improvements like generics and Linq.
> (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 that it was actually a good language, at least for that era.
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 array, and in principle the JVM optimizer will take care of the array. That is in principle, i don't know how good the optimizer got in this regard.
But i still prefer Java for simplicity and readability.
> In principle if you want to return multiple values from a method, you can return them in an array
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.
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.
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.
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.
I agree. Those emails/PDFs released in the DOJ case very enlightening and proved a lot of what Charles Ferguson was talking about in his books, "Computer Wars", "High Stakes, No Prisoners".
MSFT was even afraid of AOL, Oracle, and others teaming up to offer a home appliance (eg. a net PC) at low prices and undercutting the PC industry. Of course, those partnerships and alliances never did work out. Sun and Netscape hated each other, for example.
Microsoft was even worried Sony would "take over" the home since game consoles were becoming as powerful as PCs. Flash forward a few years: when I used my brother's PS3 in 2010, I couldn't believe how awful the browser was on such a powerful machine.
Hollywood and media companies were also afraid of Microsoft in the 90s. MSFT was making deals with Dreamworks, NBC (ie MSNBC), and others. It really did seem like MSFT had the cash to takeover the world and charge fees everytime a movie needed to be distributed. At one point, early on, Bill Gates suggested people would pay a nickel or dime to view a website.
Then, in the low 2000s, when .Net came out, there was a slide that compared the PC desktop to the WWW. MSFT wanted to offer APIs/languages/abstraction layers for the WWW that were analogous to the MSFT desktop.
The same paranoia people had of MSFT/AOL/Oracle, continues, but the names have change to different companies.
Ain't that the truth! The bitter irony is that a bunch of the Sun-hating Netscape programmers went over to AOL after the acquisition, just to be mis-managed into the ground by a bunch of "Alliance" managers from Sun.
>Case told the Netscape workers that after the merger is completed next spring, stock options will remain valuable, their sabbatical program will remain in place, and their corporate culture will remain intact.
>"Maybe you joined the company because it was a cool company," he said. "We are not changing any of that. We want to run this as an independent culture."
>Netscape cancelled a project to develop a Java version of Netscape Navigator with Sun Microsystems Inc. because Netscape couldn't afford it, according to Kannegaard. Kannegaard's claims are at odds with the story Netscape told publicly about the reason it killed its so-called Javagator product. "It was explained to me that after Microsoft in their [Netscape's] words undercut their business, they could not afford to continue the project, so they had to reduce their engineering resources and cancel this project," Kannegaard said.
>That is not the story Netscape told the general public. According to a story in ZD Net's sister publication, PCWeek published Feb. 26, 1998, Netscape said it was pulling back on Javagator in hopes of getting help from Network Computer manufacturers such as Sun and Oracle Corp.
>After the layoffs, iPlanet will largely be a Sun satellite. As of last July, only one-third of iPlanet's approximately 3,000 employees were from AOL, Sun Chief Financial Officer Mike Lehman said. Lehman has further said that Sun largely owns iPlanet's intellectual property.
> (Tuple unpacking is the clean way, but that has only recently been added.)
That's both accurate and a little misleading. Tuples are ten years old, they were added in 2009/10. However, improvements in syntax and cleaner unpacking have been recent additions.
In general though ref and out have taken a back seat to Tuples for years now in C#.
Out and ref were already a thing in many Algol/Pascal derived/inspired languages.
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.
> Sun could have (and should have) copied them in Java, and I don't know why they didn't.
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.
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 report was amusing reading). Perhaps they were also similarly opposed to C#'s features?
The "out" feature definitely violates OOP principles even more than tuples would.
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.
Ah you're right, they were added in C# 2.0. I wasn't sure about them but was too lazy to check. I don't even remember how was auto generated code handled? Was it in a collapsed region?
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 of the difference comes from the nature of the language designers and the timing of the language's creation. Joy had the handicap of going first, and Java has some choices that reflect that. Hejlsberg got to look at the weakness of Java to make C#. Overall, I think the practical approach to C# makes it a more useful language than Java, where Joy has some definite philosophical baggage he's carrying around that is reflected in Java.
Note we're talking a fairly fine gradation here. If you need to work in either, you're not slumming.
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 that I can only use the very latest features on private projects.
> C++ enterprise code looks mostly C with C++ compiler
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.
To be fair, if you're using C++ for a standard, run off the mill corporate solution nowadays, that's probably a "wrong tool for the job" kind of situation anyway.
>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 worked at Sun in 1990, Macs were considered useless toys (while PCs were considered useless, but not fun enough to be toys), and you had to get special permission to bring a rented Mac into the building to work on -- they wouldn't buy them, so you had to buy one yourself and keep it at home if you wanted to know what Apple was up to.
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...
Sometimes I wonder how things would have looked like if they actually went forward with OpenStep.
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.
The other mistake that Sun made with Java was its linguistic supremacist "100% Pure Java" propaganda campaign: you should rewrite all of your code in Java instead of expecting Sun to provide you with easy seamless interoperability with existing languages and libraries.
So Sun's JNI and applet web browser integration languished while Microsoft integrated COM and CLR for seamless interoperability with the web browser and other languages like C++ into Java and CLR.
Sun also had an unholy obsession with code generation, since their attitude was to breed as much 100% Pure Java Code into the world as possible (see AspectJ, JAXB, etc). While C# took a much better approach of supporting code annotation and metadata and reflection and bytecode generation at runtime so you didn't actually have to generate and compile a huge pile of boilerplate source code (see PInvoke).
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’t a missed opportunity to clean up the language.
But at the risk of being overshadowed by a newer, simpler language. Which is kind of what is happening now with python (it's not newer but its simplicity is giving it a lot of traction).
There's a risk of being confused on how to do things with backwards compatiblity, but it's something that makes me like c# better than other languages. Being able to add new features without removing old features is great. Older examples of c# may look completely different than new examples but that is great because someone can continue without learning all the new stuff (kind of odd, but eh).
Removing old functionality could doom them because they already have a lot of confusing dependencies when using part .net core, part .net 4.5. They don't support newer versions of .net on the old windows 10 versions, making support complete Hell as far as that is concerned.
I think cleaning up documentation and old examples some would make the evolution of the language easier but isn't strictly necessary to still be useful. Even in strict enterprise, though it may be annoying.
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! ;-)
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.
> Joy had the handicap of going first, and Java has some choices that reflect that.
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.
> 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#...)
I'd say that's true of the JVM, where independently developed high-adoption languages Kotlin and Scala have flourished, but not so of the CLR, whose only "new" language of any import is F#, developed by Microsoft themselves and kept in step with C#.
I'm glad they don't throw everything and the kitchen sink into Java. There's so many keywords in C# that are really not necessary, yet you need to learn them, because you can be sure, you'll run into some codebase where some advanced C# dev used all of those features anyways.
This is the reason why people find C++ intimidating and why there's probably hundreds of unofficial subsets of it, which are supposedly better.
It slows down people who are new to the language, is annoying for people switching back and forth between languages and adds additional mental complexity even for people who frequently use the language.
And as for the IDE, that may be true, if you happen to like Visual Studio (and don't want to dev on Linux), but if you don't like it, then your options are rather limited.
IMO it's completely inferior to LINQ in C#. One of the main reasons being that Java still lacks extension methods, so you're stuck with the methods that are provided for you. In C#, if I want a Dedupe in my LINQ method call chain, I can simply implement it myself.
A Linq expression can be translated at runtime to allow the same code to be tranlated to Sql for an RDMS , MongoQuery, or anything else that you write a provider for.
I 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 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?
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, not the JVM runtime.
I am glad you're pointing this out, because the limitations of the JVM are often overlooked as a big reason for why "we can't have nice things" in Java.
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 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.
That's hyperbole. Yes the releases are now every 6 months, but there are still long-term releases that have support for at least 3 years.
The bi-annual releases aren't for companies to upgrade to every 6 months but for power users who like to experiment and try out new bleeding edge features. Same as with Ubuntu releases for example.
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.
Yes, I know about LTS releases. But upgrade time from one LTS to another LTS is only 3-4 months. Check [1]. For JDK8 for people using it for commercial purpose, the updates will stop in Jan. 2019 only after 4 months since new JDK 11 LTS release.
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.
Funny thing. After all these year it actually seems like Java now has the upper hand.
It 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.
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.
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.
No, VSCode is not VS and that's a good thing, VS is a beast, you called it "a big IDE" and that's true, VS code is much lighter.
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.
> Java is the primary development langauge for Android.
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.
Your comment couldn't be more wrong. .NET Core is an open platform, and has been for some time, with its framework and runtime hosted on GitHub. .NET Core's toolchain is a simple CLI which integrates with many popular CI/CD solutions (e.g., TeamCity). .NET Core has been stable on several Linux distros for many months and can hardly be characterized as "experimental." C# has a cross-platform, lightweight editor in VSCode--no Visual Studio required.
I suggest you update your knowledge before spreading blatantly incorrect information like this.
Microsoft 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. They were forced to disable the Microsoft only extensions in Visual Studio and warn developers that they were creating Microsoft specific code when the extensions were enabled. Microsoft got mad, went home and broke all their toys. Next day they came back with C#.
Java was far less open back then than it is now, and this lawsuit is a good example.. There was even a question whether you could have a clean room JVM implementation at all.
I was involved in some of the first non-Sun java VM implementations and spent some time at Microsoft. The quick list of major reasons:
1. competition between Microsoft and non-Microsoft camps
2. Java was far less open in the 90's than it is now
3. .Net/C# is a better language and runtime,(e.g. how it deals with native code, designed for JIT compilation from the start, created with multiple languages in mind)
86 comments
[ 4.0 ms ] story [ 175 ms ] threadThey 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 outside company to drive the technology platform they would be relying on.
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.
https://www.youtube.com/watch?v=ZYw3X4RZv6Y&feature=youtu.be...
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 because C++ API's had call by reference, and MS wanted to make integrating with windows API's easier. I suspect value types (structs) were added for the same reason.
That said, C# did end up a much better language than Java, especially with later improvements like generics and Linq.
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.
But i still prefer Java for simplicity and readability.
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.
[1] http://openjdk.java.net/jeps/305
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.
MSFT was even afraid of AOL, Oracle, and others teaming up to offer a home appliance (eg. a net PC) at low prices and undercutting the PC industry. Of course, those partnerships and alliances never did work out. Sun and Netscape hated each other, for example.
Microsoft was even worried Sony would "take over" the home since game consoles were becoming as powerful as PCs. Flash forward a few years: when I used my brother's PS3 in 2010, I couldn't believe how awful the browser was on such a powerful machine.
Hollywood and media companies were also afraid of Microsoft in the 90s. MSFT was making deals with Dreamworks, NBC (ie MSNBC), and others. It really did seem like MSFT had the cash to takeover the world and charge fees everytime a movie needed to be distributed. At one point, early on, Bill Gates suggested people would pay a nickel or dime to view a website.
Then, in the low 2000s, when .Net came out, there was a slide that compared the PC desktop to the WWW. MSFT wanted to offer APIs/languages/abstraction layers for the WWW that were analogous to the MSFT desktop.
The same paranoia people had of MSFT/AOL/Oracle, continues, but the names have change to different companies.
Ain't that the truth! The bitter irony is that a bunch of the Sun-hating Netscape programmers went over to AOL after the acquisition, just to be mis-managed into the ground by a bunch of "Alliance" managers from Sun.
https://www.cbsnews.com/news/aol-woos-netscape-employees/
>Case told the Netscape workers that after the merger is completed next spring, stock options will remain valuable, their sabbatical program will remain in place, and their corporate culture will remain intact.
>"Maybe you joined the company because it was a cool company," he said. "We are not changing any of that. We want to run this as an independent culture."
Pffff!!!
http://www.zdnet.com/article/a-year-ago-friction-behind-aol-...
>Netscape cancelled a project to develop a Java version of Netscape Navigator with Sun Microsystems Inc. because Netscape couldn't afford it, according to Kannegaard. Kannegaard's claims are at odds with the story Netscape told publicly about the reason it killed its so-called Javagator product. "It was explained to me that after Microsoft in their [Netscape's] words undercut their business, they could not afford to continue the project, so they had to reduce their engineering resources and cancel this project," Kannegaard said.
>That is not the story Netscape told the general public. According to a story in ZD Net's sister publication, PCWeek published Feb. 26, 1998, Netscape said it was pulling back on Javagator in hopes of getting help from Network Computer manufacturers such as Sun and Oracle Corp.
Meow!!!
https://www.cnet.com/news/aol-layoffs-slam-sun-netscape-alli...
>After the layoffs, iPlanet will largely be a Sun satellite. As of last July, only one-third of iPlanet's approximately 3,000 employees were from AOL, Sun Chief Financial Officer Mike Lehman said. Lehman has further said that Sun largely owns iPlanet's intellectual property.
Owch.
That's both accurate and a little misleading. Tuples are ten years old, they were added in 2009/10. However, improvements in syntax and cleaner unpacking have been recent additions.
In general though ref and out have taken a back seat to Tuples for years now in C#.
Agreed: integrating with other languages was very important to Microsoft, but not to Sun with its "100% Pure Java" campaign.
See my other comment about that: https://news.ycombinator.com/item?id=16354176
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.
That is what appealed to me back then.
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
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?
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.
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
I think much of the difference comes from the nature of the language designers and the timing of the language's creation. Joy had the handicap of going first, and Java has some choices that reflect that. Hejlsberg got to look at the weakness of Java to make C#. Overall, I think the practical approach to C# makes it a more useful language than Java, where Joy has some definite philosophical baggage he's carrying around that is reflected in Java.
Note we're talking a fairly fine gradation here. If you need to work in either, you're not slumming.
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.
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.
Apparently they're now moving to a 6-month release cycle.
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 worked at Sun in 1990, Macs were considered useless toys (while PCs were considered useless, but not fun enough to be toys), and you had to get special permission to bring a rented Mac into the building to work on -- they wouldn't buy them, so you had to buy one yourself and keep it at home if you wanted to know what Apple was up to.
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.
So Sun's JNI and applet web browser integration languished while Microsoft integrated COM and CLR for seamless interoperability with the web browser and other languages like C++ into Java and CLR.
Sun also had an unholy obsession with code generation, since their attitude was to breed as much 100% Pure Java Code into the world as possible (see AspectJ, JAXB, etc). While C# took a much better approach of supporting code annotation and metadata and reflection and bytecode generation at runtime so you didn't actually have to generate and compile a huge pile of boilerplate source code (see PInvoke).
https://docs.microsoft.com/en-us/cpp/dotnet/how-to-call-nati...
http://www.pinvoke.net/
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! ;-)
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.
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.
I'd say that's true of the JVM, where independently developed high-adoption languages Kotlin and Scala have flourished, but not so of the CLR, whose only "new" language of any import is F#, developed by Microsoft themselves and kept in step with C#.
I'm glad they don't throw everything and the kitchen sink into Java. There's so many keywords in C# that are really not necessary, yet you need to learn them, because you can be sure, you'll run into some codebase where some advanced C# dev used all of those features anyways. This is the reason why people find C++ intimidating and why there's probably hundreds of unofficial subsets of it, which are supposedly better.
It slows down people who are new to the language, is annoying for people switching back and forth between languages and adds additional mental complexity even for people who frequently use the language.
And as for the IDE, that may be true, if you happen to like Visual Studio (and don't want to dev on Linux), but if you don't like it, then your options are rather limited.
- Boxing
- annotations
- StringBuilder
- LINQ
- var (coming with 10)
Edit: this is not correct. My bad.
Java annotations started to be discussed in 2002, with JSR-175, finally delivered with Java 1.5, released in 2004.
So how come it is a Java innovation?
http://www.dotnettricks.com/learn/linq/understanding-express...
A Linq expression can be translated at runtime to allow the same code to be tranlated to Sql for an RDMS , MongoQuery, or anything else that you write a provider for.
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 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?
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...
http://pizzacompiler.sourceforge.net/
But then only part of it was taken back into Java.
Both 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.
The bi-annual releases aren't for companies to upgrade to every 6 months but for power users who like to experiment and try out new bleeding edge features. Same as with Ubuntu releases for example.
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.
[1] http://www.oracle.com/technetwork/java/eol-135779.html
[2] https://en.wikipedia.org/wiki/Java_version_history
It 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.
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 that platform target "experimental" any more. It's in version 2 now
> And finally there is Android.
Yes there is. I know teams that write in C# for Android and iOS. (4)
C# is late to the party in this regard. But what you are saying isn't correct.
1) https://github.com/dotnet
2) https://code.visualstudio.com/
3) https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet?ta...
4) https://www.xamarin.com/
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/
2) http://www.omnisharp.net/
3) https://aws.amazon.com/blogs/developer/aws-lambda-net-core-2...
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.
There is Visual Studio For Mac [1], though I'm unsure how it compares to Visual Studio "proper".
[1] https://www.visualstudio.com/vs/visual-studio-mac/
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.
I suggest you update your knowledge before spreading blatantly incorrect information like this.
https://www.cnet.com/news/sun-microsoft-settle-java-suit/