Let's stop bashing C#
codeaddiction.net
codeaddiction.net
The biggest rejection comes from the strong windows orientation and the restrictive licenses. Now that the situation is improving for both, you will see the language gain traction.
On the flip side there's a lot of people who over-represent C# especially in comparison with Java. I mean the language is very nice, better than Java no doubt - but the platform and ecosystem is much less mature than JVM. Where is the .NET equivalent of ZooKeeper, Hadoop etc. .NET can use those like any other language but the fact of the matter is that Java was and is still the choice on those kinds of projects and the ecosystem is much bigger. Even when .NET gets something from those like Akka.NET, JGit it's usually a worse copy. And JVM ecosystem is much more distributed, there's plenty of stuff going around all over - Scala feels a lot more popular in the real world than F#, Clojure feels like a similarly niche thing but is entirely community driven, and the early results from Graal/Truffle were quite impressive, much better than Microsoft did with the DLR before they left it off to community.
We also needed to use Redis in C# and the client is unstable. Nothing we can do about it besides catch the exceptions and randomly reconnect when it happens. Are we losing some data? Probably.
Even if the open source community embraces C# it will take 10 years before the offerings are comparable to Java. And for what? C# is nearly identical to Java in design and performance, it just has slightly prettier syntax
One important difference that can make Java almost impossible to use in some scenarios is value types - and that's a pretty big thing when you need to control memory layouts, deal with huge arrays of small structs, etc. Other than that I agree.
I really wish MS did something to make Java/C# work together.
All the guys that live in MS world swear they're not missing out on anything. But these are the same guys that lived in the enterprise version of North Korea until a few years ago.
I like that phrase. Unfortunately it describes my life :-(
Java has a huge ecosystem for web services, big data and co. The amount of available frameworks and libraries there is partly so large that you even don't know where to start and what to use.
C# has a smaller amount of tools available for web. However in the industries where I worked (automotive, embedded, etc.) I always see C# based libraries and tools instead of Java ones. E.g. I've seen dozens of test frameworks for embedded systems written in C#, none yet in Java. Also libraries for specialized measurement equipment are often available for C#. I guess that's somehow because the EE industry is traditionally more MS focused than the pure software world, and Windows is still the default installation.
The runtimes and libraries for non windows platforms are still behind, and are quite new. Additionally while there has been efforts to grow the community and get outside involvement, it is still obvious that Microsoft is the big player, and without their involvement the community might shrink to a fraction of its size.
Microsoft itself complicates matters as for some people it takes a lot to be convinced that "new Microsoft" isn't just old Microsoft in sheeps clothing, and its all a ploy to get people onto their platform so they can lock you in. I have started to be convinced that microsoft has actually turned a leaf and is actually working to build a community and genuinely will support other platforms, but I am always going to be a little cautious... call it post traumatic stress from the early 2000s.
Finally I don't see a reasons to rush to build in C#. It seems a perfectly decent language, but without being experienced in the language is there a problem domain (outside rich client windows apps) where the language is significantly better then other choices?
I don't think C# should be bashed, but I also think it still needs to prove itself to the non windows platform and open source developers.
Many of the features you mentioned are not available for the .net core version. The .net core version is not a standard install on client servers (it is not shipping with RHEL/CENTOS) and is still very recent. Having supported dozens of Java apps through the early versions, the last thing I want to do is spend my time discovering esoteric runtime / os library version conflicts.
So yes, the language needs to prove itself that as a platform for delivering Linux / Mac server apps that it is as boring and reliable as the rest of the stack.
But the OP did specify for non-Window OSes and for Open Source. And I don't think they meant that the language itself had to prove itself, I think they meant that it needs to prove that it can inspire programmers in those other cultures. That's quite a reasonable statement IMHO.
MS stumbled out of the gate with this. They made a reference implementation, but used their crazy shared source license for it. The Mono/Gnome guys had a huge love affair with MS (to the point of trying to make their own implementations of Com objects and the registry (!)). MS was vague about their feeling about Mono for far too long. Even now, my understanding is that Mono is very careful not to tread on any toes when re-implementing things that are in .Net. And I'm probably one of the few people who used the open source .Net library (whose name I forget now... Mobile.Net... or something) and was constantly cursing that MS made it difficult for code to run on both that platform and a full blown windows .Net platform.
If you want to write proprietary code on Windows? Absolutely C# and .Net all the way (or, these days F# is looking very nice). But open source on a Posix box? Not touching it with a ten foot pole. I've got lots of better options.
MS kept designing APIs and kept throwing more things at the platform, hoping for something to stick. The result felt like a massively over-inflated platform with all manners of solutions no one else uses.
I was around when MS was inventing a new take on ASP.NET twice a year (MVC, Razor, &c). I'm still super not a fan of the base runat='*' GWT imitation, and would easily suggest Apache Tapestry as a far more consistent and usable set of tech for people wanting seamless server-powered webapps that also does Ajax far more cleanly. At the time I was using Jayrock to eskew the rest of the platform & do some basic RESTful JSON services, which seemed very low on the priority list in favor of the mixed GWT-alike full interface building in C#, with deep ViewState magic, and I'm still not sure where if at all C# and ASP.NET's sweet spots are when you want to do your front end in JS.
There's a lot of table stakes you've mentioned, and my experience is very historical, but what it felt like watching it happen at the time was that a lot of the platform was an attempt to clone other existing technologies, while not rebuffing older MS users, resulting in constant compromise and shifts as the previous stance proved insufficient and in need of amendment. You've listed some very nice, well implemented technical things the platform has (that a lot of other people have versions of), but what is most impactful for a language is it's standard library, is the platform of APIs it offers, and while the core C# language and structures are pretty good, there's a huge amount of historical baggage one has to wade through to understand what platform APIs are good and useful and in use and which ones one is better off avoiding. It's been a long time since I was in this world, so perhaps some of the newest ones have finally gotten everything right, but the base model- especially for webdev- felt grotesquely off in every permutation, already doomed by desire to keep dragging yesterdays coders and backwards compatibility forward as it tried to make an ok future.
Makes no sense either way. But as far as I can tell little of TFA does, just some bloke claiming victimhood for their pet language.
It's like a grandpa getting angry alone in front of his mirror.
Seriously, that's one of the bigger straw man posts I've read in a while. Sure, I'm confident that somewhere on the big, wide Internet claims such as those listed by the author can be found. And some folks seem entirely convinced that the Earth is flat.
You want "bashing"? C#'s got nothing on, say, php. C#, AFAICT from circles I pay attention to, is loved far more than it's hated. But, as someone else in this comment section pointed out, it's a hell of a way to generate clicks.
Of course, he did it in his classically abrasive style, so not that many people championed the article.
- C# smells corporate, being used in many large scale business application.
- C# is developed by Microsoft, a billion dollar company itself
- The .NET platform is only partial open source
So facts don't matter much, it's about smell :)
Besides that though, C# is much nicer than Java and fills a similar niche.
That's not of much worth if the design process remains firmly in corporate hands.
Microsoft is currently, slowly, opening the process to the community, but even then I expect corporate will continue driving most of the roadmap and keep veto on everything, very much like Swift — which is much much much further on that track than C# is, Microsoft having only created a C# design/evolutions mailing list and repository literally days ago, the ML was created on January 30th[0] and the repository was created and announced on February 1[1], the "community input" doesn't actually exit yet.
[0] https://lists.dot.net/pipermail/csharplang/2017-January/thre...
[1] https://blogs.msdn.microsoft.com/dotnet/2017/02/01/the-net-l...
[1]https://lists.dot.net/pipermail/csharplang/2017-February/thr...
That link was in support of my claim of the ML having been created on January 30, nothing else.
And people posting stuff on a mailing list means nothing if it doesn't actually impact the language, which we can't judge yet because the opening isn't even a week old yet.
As for the "lot more activity", it's mostly two blokes (Justin Spindler and Tanner Gooding) posting their old roslyn issues back to the ML. If you're looking for disingenuous may I suggest a mirror?
It's my preferred language, especially now it is getting functional constructs. It's basically a more advanced, concise and flexible version of Java. Only with value types (fast algorithms).
As others have said the ecosystem is different, it's better for games (Unity) but horrible for NLP (Lucene.net is a museaum piece and NHibernate isn't great).
I write just as much TypeScript/JavaScript nowadays and keep my Java/Python up to date. I really want to add a functional language to replace Python (the 2/3 divide is tiring) but don't have the time (thanks to having two young kids and a wife who also works full time).
https://referencesource.microsoft.com/ https://github.com/Microsoft/referencesource
It's under a proper Open Source license now too (the MIT license).
Also why is it bad the language is developed by a billion dollar company? It means the language tooling is second to none, as well as having fully document libraries which can do everything, and are kept up to date.
The .NET platform is now completely open source[2]. The compiler (Roslyn), tooling (cli), the runtime (coreclr), and the standard library (corefx) are all listed there, all under the Apache 2.0 license.
What's not open source?
[1] https://github.com/dotnet/csharplang [2] https://github.com/dotnet/
Or would you prefer committee ownership like JavaScript (EcmaScript)? Maybe something like http://www.ecma-international.org/publications/standards/Ecm...?
No matter which programming language is mentioned here, there will ALWAYS be a few people commenting, "I like 'X' better!" (where 'X' is usually an emerging language that they tinker with in hobby projects and haven't used professionally yet).
That caveat aside, C# has generally been one of HN's darlings in recent years. People who crap on Java turn around and praise C# in the next breath, because:
(1) There are some syntactical niceties that make C# feel "lighter",
(2) MS has developed a more "open" and even "cool" reputation over the past few years, at least in comparison to Oracle, and
(3) In many cases, it's again people who have started tinkering with it in personal projects, and haven't yet hit the inevitable pain points of using any language for real professional work in a team setting.
C# certainly isn't Haskell, but it checks off enough functional checkboxes to have some cred, while still being approachable and familiar enough for non-academic mortals out in industry. Xamarin and Unity aren't perfect, but they give C# a solid foothold in mobile and gaming (which, along with web dev, are the holy trinity of domains that drive hype among young devs.
I really haven't heard much negative chatter. There will always be the people holding on to MS's propriety brand image from the 90's, who always want to comment on it from their Apple devices today. But on the Internet hype spectrum of "cool" (Rust, Go, Elixir) to "uncool" (Java, PHP)... I'd say C# is at least 10% off the middle, in the direction of "cool". It checks the checkboxs of:
* "mildly interesting",
* "low learning curve",
* "ease of actually finding an employer who uses it", and
* "not likely to fade away because people don't migrate to version 3, or because Mozilla can't find another sponsor after Yahoo, or because yet another Ruby-successor comes along next week and sucks up all the hype, or whatever".
Really, the only people who criticize it a lot are the people in Microsoft shops who actually use it for a living today (!), but isn't that pattern usually true for everything?
Until that fateful day we must all accept criticism of our favourite language even though we are so smart and know it's the best language.
Microsoft is doing fine and their products also. Not mentioning the rize of Visual Code that is trending EVERY release :)
That said its still a fine language. Not a fan of the dogmatic OO design concept in Java and C#, but it's perfectly good at what it does.
With .NET Core and Microsoft's new CEO's vision, I am excited for the future of C# (and F#) and very happy to put Java behind me. The CLR is a lot nicer than the JVM too.
Now if only the ClojureCLR could get the support that ClojureJVM had, I'd be done with the JVM entirely.
What about the c# developers hating vb.net or java? What about .net experts bashing jvm, php, node ? What about windows users bashing *nix for GUI? ahh the list is long, from both sides.
Frameworks and Languages are fine, but what have you actually done with your stack?
That makes it an instant no-go for me. I'm not a software packager and I'm not becoming one to try new and unstable C# tooling.
Visual Studio Community was a pretty terrible experience and I don't intend to spend more of my time on unreliable Microsoft products.
Kinda the opposite of IDE-centric development, but the available Xamarin tooling didn't support that way of working.
Instructions for Debian[1], Fedora[2], Centos[3] and Ubuntu[4]. These all seem like pretty simple copy+paste instructions.
[1] https://www.microsoft.com/net/core#linuxdebian [2] https://www.microsoft.com/net/core#linuxfedora [3] https://www.microsoft.com/net/core#linuxcentos [4] https://www.microsoft.com/net/core#linuxubuntu
That vs. adding a single line in my list of selected packages. The price to adoption is high and it's just not worth it to me, especially seeing how immature the tooling and overall ecosystem is.
I choose to trust Debian maintainers; I don't choose to trust Microsoft.
If the package ends up in Debian stable, its pretty much guaranteed to be stable and to at least install and uninstall cleanly and consistently; it also won't have builtin telemetry because that's Not Done in the Debian distribution.
With the beta stuff provided by Microsoft there's no reason for me to assume a similar level of diligence.
But surely there's no reason why we can't have both?
Talk about damning with faint praise...
I've been primarily using python for the last couple of years so it's been a really interesting experience. Here are some of my thoughts:
- The language itself is really mature and actually really easy to be productive in. We're using ASP.NET MVC and getting to know the right way to do things took a while though.
- It's hard to use C# without Visual Studio on Windows. I've tried Rider from JetBrains which is decent but takes SO much memory and is pretty slow to develop in. I've been using VSCode recently which is a great general editor but lacks a number of great VS features. Visual Studio for Mac doesn't work with how our app is structured for some reason (VS on Windows in a VM works fine though). I've had to fire up bootcamp a few times to use VS on Windows.
- I thought static typing was going to make it harder to do things, but I think in terms of preventing some common bugs its great. It's no silver bullet though.
- I'm developing on a mac and deploying on Linux. There's no great way to filter for .NET Core packages on NuGet (the M$ package manager). We've run into some issues trying to use versions of packages that aren't yet .NET Core compatible
- There are a number of commonly used Linux environment tools we cant use, like New Relic for APM, because they don't have support for the platform version yet
- The ORM (Entity Framework) we're using is nowhere near as good as something like SQLAlchemy when it comes to migrations. It's laughably bad.
- The testing framework is pretty good, but without real Visual Studio we're missing some great features like code coverage analysis
- Paying for a license to use a library we needed feels REALLY weird
- Overall our web service is really fast. Asynchronous programming in C# is very easy and very powerful and we've been able to make a lot of performance gains by using it judiciously.
- Its honestly hard to find answers googling around sometimes because there are so many version of .NET and 10+ year of answers to the same questions. The same can be said for a number of languages.
- Our build and deployment already handles a few other statically typed languages to making it work with .NET wasn't a big deal for us, but I can see how that could be hard
I'd be happy to answer any questions that people might have.
JVM > CLR
my opinion. I'll pick java everyday over c# due to the jvm. unless I'm building windows only app or an app for the app phone.
They may have changed course but open source software has for 10+ years largely avoided the platform. This means C# is Java with nicer syntax but 10% the libraries and terrible cross platform support.
There's been countless times at work when I needed a certain library and I already knew what the Java equivalent was, but what I was looking for simply didn't exist. Database clients, data processing, http2, image manipulation, etc...
With Java I get everything I do from C# plus all the stuff they've been raving about working on in .NET core . Plus I get choice. There's 3 full featured IDE's, 20 or so servers, 6 or 7 JVM's
In addition there are several C# IDEs available, including from JetBrains who creates IntelliJ! Roslyn makes fancy features such as auto complete available to text editors as well such as VS Code or Atom.
In Java I can run Jetty or Netty on whatever and use http2. Old Os or whatever doesn't matter because the protocol isn't tied to the OS network stack.
ETA: Also, my comment above was meant to be from the perspective of that it is a technically finished product with an active support lifespan. I did not mean to imply that it was better (or worse) than any alternatives, but that under the accepted definition of "production ready" where a thing is finished and supported, it is suitable to that.
.NET Core has none of that going.
I'm use VS all the time, so I'm not going to dump on it too much, but there is definitely room for improvement. I'm only vaguely familiar with VS 2017, but I understand they've put their IDE on a diet.
It's not just the current gap, but the absence of long-term guarantees that the ecosystem will stay on the current open-source trajectory. Microsoft can close SQLServer back down tomorrow; nobody can take away Postgres (even when someone tries, like Oracle with MySQL, the community reacts pretty quickly).
C# is a nice language and if you stick to the classic MS ecosystem you can be very productive, but if you're not invested in Windows and you're not ready to spend real money for it (either right away or at short notice), you should probably look elsewhere.