(personal anecdote - as senior java guy with 10+ years of experience, I've got recently assigned a small project of amending legacy MFC C++ (but mostly C) app - I could write a book about the pain. Language itself is a minor obstacle in this effort (albeit MFC/WinAPI has very steep learning curve for me).
Where Java wins, and will win for many years to come is maturity of toolset, quality of open source libraries and also probably the most important thing - the amount of skilled developers any employer can pick from.
.NET platform will probably get (finally) on track, but it's an uphill battle against Oracle's current position. But I like the situation - improvement in MS camp will force competition to improve as well, so we all benefit :)
Eh? .NET land has been on a higher technical superiority level to Java for almost a decade. Pretty much as soon as .NET got generics at the CLR level the tide was changing. Then that so-called LINQ feature in C# put the final nail in the Java coffin. The fact that .NET has always had value types and function/delegate types from day one has meant the third party .NET toolset has emerged in a different less clumsy way than in Java land.
> "but it's an uphill battle against Oracle's current position"
Eh? Java isn't even open source in any meaningful sense. Just look what happened to Google/Android when they mistakenly thought Java was open source.
I'm not sure what this so called "maturity of toolset" for Java really is either. Most of it is just piles of garbage libraries and frameworks to work around fundamental flaws of the language, and/or to continue pedalling the broken enterprise styles of OOP and SOLID bandwagon onto yet more innocents.
> "the amount of skilled developers any employer can pick from."
Eh? Ever tried picking a good one from a batch of Java Enterprise devs? It can be a costly exercise. There is almost nothing to distinguish them, that is the problem. Because they're all just Gang Of Four Do-Repeat-Yourself-But-Claim-Not-To code monkeys.
On the matter of the toolset, let's call it a draw. Visual Studio is IMHO vastly better and more reliable than Eclipse or IntelliJ. Java has a longer and richer history of good third-party tools with Apache, the Maven ecosystem, etc., which are still ahead of NuGet and its siblings. I think Maven still gives the edge to Java for dependency management, building, and packaging, although it takes a long time to get into its mindset. It sure is nice to have the same IDE and same build process across Windows, Linux, and OS X development environments (I use all three during the course of a day and it helps keep the build honest).
Now, the runtime and hosting... I can't say enough good things about being able to throw together executable-JAR docker images with Java. On the other hand, I'll take IIS over other web servers, given the choice. CLR vs. JVM is a tough call... the myriad versions and OpenJDK vs. Oracle JDK licensing fracture are not helpful for Java. On a technical basis CLR and JVM have rarely bitten me often or badly enough to produce a clear bias--provided the code is sound and there's _no_ _JNI_.
Whether JNI's awfulness is really a feature is a discussion for another time...
P.S. I worked with Java (now only Scala) and C#, so I have experience with both languages/envs.
Even if they did open those, they're of very little use outside Windows platforms without a huge amount of work to remove how tightly they bind to the windows APIs. There's much better alternatives if you want to do UI cross platform (or just 'not windows').
Now, if on top of the IDE, which is at least on par with VS + Resharper, you add things like build tools, project management tools, testing and code coverage tools, Java is basically the Godfather. xUnit, including NUnit, comes from Junit (Java), Nant was inspired by Ant (Java), Nuget was inspired by Maven (Java), etc.
For day-to-day Scala development incremental compilation etc. mean that a typical build in my IDE takes about a second. I think it has more to do with Java being the default/official language for the JVM (and the Scala learning curve). Similarly, F# is a great language, but C# has always been seen as the default go-to language for the CLR (VB.NET anyone?).
I mean, to be fair, these are all things that Haskell offers me, but more languages getting these can't hurt! Good steps forward! Now, all I have to hope for is that the nix support for .NET becomes more robust so I can actually code in C# on platforms that I care about supporting ^_^ (Note: this is not meant as a slight towards Windows, I just prefer working with / coding for nix).
For example, Pattern Matching. From my glance it appears a nice way to assign bindings from an expression, but I didn't see anything about guards. Also, any kind of pattern matching without the ability to check for exhaustiveness defeats the safety they provide usually comparable with inheritance.
Which comes to Algebraic data types. All I know is there are several boxes you must tick to really call it "Algebraic data types". I am not sure all those boxes are "ticked" here. This question came up when swift introduced "Algebraic data types", but no-one could get recursive ADT's to compile. it does look like this proposal allows recursion, but there are other things i'm sure are at play such as how it works with generics.
Well, I hope that they manage to fill out each feature a little more. Fingers crossed!
It's still a bit of a stretch to say that C# has "overtaken" Java in general, or to read too much into Microsoft's moves (they haven't open sourced any of their main profit-generating software (SQLServer, Windows etc.), just enough to earn a bit of street cred. amongst developers).
In terms of features C# is far ahead of Java, but many Java developers simply don't care as C# is far from being widely established and broadly used outside of Windows. Even on the JVM many Java developers will use Java the language as it's the standard, rather than because it is a fantastic language. Those who do care have moved on to Scala, Clojure etc. We've relegated Java (the language) largely to legacy status, but rely heavily on the Java ecosystem (JVM, IntellJ, java libs etc.).
They are fairly transparent if you ask me. Here are a few examples[1][2], there are more to be found on the openjdk page
Additionally, scala already has some of the features proposed for the inclusion in C# in the future.
I was really hoping for better integration of tests and pre/post conditions
On testing and pre/post, this is an area around which I am quite sympathetic. However, I'm ambivalent about the unintended consequences of fleshing it out too far. It seems that by encouraging testable code, I get much of the relief to my pain. That said, it's a cat and mouse game for things like async-await features... followed by support for testing said language feature.
I think reducing friction and increasing productivity is really important, it's not as sexy as some of these other features but it makes real difference in big projects.
I'm getting a little worried about the async-await and task methodology. It's true that they've made a lot of that kind of programming much much easier, but it also means that orchestration is cluttering our code. It seems that now that we've elevated the level of abstraction it should be possible to get rid of it (more or less) by being more declarative in our intent and structures. We're programming on at least one layer below what we should.
Unfortunately I think that might require so large fundamental changes that you need a new language. Many might say, what about F#? While F# is great for certain more algorithm oriented solutions for me it never seemed to quite fit the paradigm of certain applications and enterprise systems.
I think in the end there's a skeleton of a next generation language embedded in what c# has become. If we removed some of the crud and used LINQ style syntax as template perhaps we could take parallelism, asynchronicity and productivity to the next level
PL's are a part product of all of history of computing, but a bigger part is a product of the programming Zeitgeist. It's better to be a young language than to have matured 15-20 years already. Certain syntactic or other choices bite you inthe ass in a new zeitgeist. When I saw Java's implementations of lambda stuff, I cringed a bit. Java's friction in generics, due to choices made about typing, also made me say, "Ouch."
I like to think I've matured out of the language and platform warrior mode enough to yield more objective consideration beyond my most-used and favorites (and are they favorites because they are most used or because they are so good?).
F# has given C# a nice boost in the juicer, but certain earlier choices are ossified and make later adaptations more challenging or, potentially, near impossible to do, do well/right.
I like that C# is going across OS's, but were also entering the Age of Containers and there are implications, opportunities, and challenges we have barely started considering.
I don't know what the future holds, but I know there will be curly braces and that tabs will win the day again... ducks
Or as Don Syme said (I think it was him or perhaps SPJ), features get done in Haskell, trickle into F#, then into C#. Even generics was in F# before C#.
And the current proposal on records does not appear to be compatible with F#. I'd give a somewhat higher probability to the F# compiler changing to deal with C# than vice versa.
We are slooooooooooooooooooowly seeing the ship turn around with NuGet, and many MS-build libs appearing on Github and the CLR and compiler going cross-platform but it's 15 years too fucking late to matter.
Java and the JVM won.
C# seems to be used in (mostly) slow-paced, slow-moving, conservative environments based fully on an MS stack top-to-bottom.
Java jobs seem to be all of those above, plus a lot of start-ups and places like Amazon/Google. Not many C# jobs at Amazon/Google besides some public facing client API; there's no MS tech in their actual back-ends, that I'm sure of.
And C# could have absolutely destroyed Java. It was already better when it was introduced and the Java eco-system hadn't acquired enough steam. But MS "wisely" decided to keep it Windows-only as if somehow C# was so awesome that it would make companies switch from Linux server farms and back-ends to Windows servers just to be able to experience the joy and glory that is C#.
Nope.
It may be very true that Java jobs outnumber C#. It doesn't change the fact that it is pretty easy to get a job in either, and both lead to generally very boring jobs. I currently service .NET clients in the above $100/hr range and have had no trouble finding work from a rather remote city also (it's no Seattle or Silicon Valley, that is for sure).
But I don't understand your obsession with "destruction" and "domination". There is plenty of room in this world for lots of technologies and they don't have to all be focused on destroying/replacing each other.
But yeah, both are kind of boring, haha. I'm in the process of transitioning to more startup-friendly technologies and languages as it's more fun for me to work on those kinds of projects.
And awesome work you have there - $100/hr? Lucky!!! Consulting work?
It's great if you have to work on projects that are stuck with C# (but can freely use the latest compiler).
Non the less: cool "new" features in C#, and thank you very much MS for investing so generously in Haskell!
It would be a mistake to think that from Microsoft's perspective they feel they have spent enough money to even begin to think about extracting some sort of reciprocal benefit from that.
Admittedly my comment was ambiguous.
F# probably is a better functional-with-OO-aspects language, but C#/Scala are clearly better OO-with-functional-aspects languages and programmers currently want the latter.
You're probably right that it feels unfamiliar to Java/C#/Scala programmers, but I enjoy the sense of security that F# and other restricting languages provide.
I completely agree, as a language C# is more rounded, but as far as the ecosystem and tooling concerned its literally nowhere near to Java.
I LOVE the language and I've found the entire ecosystem fine. There are some corner cases for some more advanced systems level stuff, but I've yet to be unable to do something I needed to.
Java feels like a clunky dinosaur to me now. But hey, different strokes for different folks.
Maybe I've just worked with too much enterprise-y Java code which always tends to be a cluster. Anytime the acronyms "SOA" or "ESB" enter the mix I start fearing for my sanity. But even Android programming seems to have more quirks than WinPhone development, although I'm comparing my experience w/ ICS 4.0 to WP 8.1 here.
What annoyed you about C#? I'm curious where you think the ecosystem or tooling is better than C#.
You are not helping anyone out here. Why does C# suck for you?
I find the tooling for C# projects using VS as a very nice feature set. Look at what VS supports today. Grunt, npm and bower are supported by VS out of the box. Also, nuget package manager has saved me many DLL hell problems that could have occurred without it. VS also supports many third-party extensions and tooling, which is what makes me thinks it is one of the best IDEs out there.
1. On the same machine, I find VS 2012 was dragging (but memory was always hovering around 400MB)
2. Couldn't stand for .csproj style solution files (may be I'm spoiled by pom.xml, but its way better)
3. We as a team working on the same project and merging those .csproj files are literally pain in the ass.
4. The windows layout in the IDE is quite un-intuitive. You should see how IntelliJ manages all those windows.
5. The disconnected namespace and folder structure is another pain.
6. Related to the point 5, looking the source code and namespace imports, I can't see from which file those Classes are being "imported".
7. Maintaining and adding references is PITA compared to Java projects that uses maven.
Again, as I clearly mentioned, C# as language is better, but the tooling and ecosystem are not.
Its not always about the better language, Software is mostly written once, but read, refactored, maintained thousands of times by dozens of people. So the tooling and ecosystem has its place, so as the backward compatibility.
3. Did you try adding "*.csproj merge=union" to the gitattributes? I have never had a csproj merge conflict since adding that.
4. That really comes down to a preference. For me I feel the IntelliJ style keymap is better, but I would take the window layout of VS over WebStorm (just naming one i use often) any day of the week.
5. If your team decided to not have namespaces match the folder structure, thats their prerogative.
6. "Go to Declaration"?
7. NuGet has solved this problem for me.
But you're right, the C# ecosystem is certainly not perfect. Most people seem to agree that msbuild is frustrating to work with. And I really really wish csproj had wildcard support for including files.
this is an interesting claim
I'd fully expect someone coming from a .NET ecosystem to have a similar reaction, and the truth lies somewhere in the middle: both of them have their things they excel at and things they are less good at, but a lot of it comes down to what you are used to.
Even though my gut reaction is sometimes similar to yours, I'd jump at the chance to do C# full-time, because I think there is some really nice stuff in the language and the platform seems really interesting once you get past the parts that feel unfamiliar.
[1] http://www.spenceruresk.com/2011/01/visual-studio-2010-a-bun...
* Tuples (Proposal: #347)
* Pattern matching (Proposal: #206)
* Records / algebraic data types (Proposal: #206)
* Nullability tracking (Proposal: #227)
* Async streams and disposal (Proposals: #114, #261)
They seem to be really useful for a "more-functional style" of programming.
When comparing these ambitions and the level of transparency to Java's ambitions & transparency, then it seems that C# is (or has) overtaking Java. Combine that to the fact that dotnet is now an opensource project, and MS seems to be more "open" nowadays then Oracle has ever been: I'm stoked about this news.