Because I’m sometimes a glutton for punishment, I chose to reply in depth
Which is the better language? C#, I have no qualms about saying this. It’s not even a contest. Just examine their origins.
C# was designed at Microsoft, a huge and very successful company with a ton of resources, as a part of one of their flagship engineering efforts; the introduction of the .Net Framework. Its chief architect is Anders Hejlsberg - one of the top language designers in the world - who had previously worked on two successful languages: Turbo Pascale and Delphi. The C# team has lead the language with a steady hand, developing an ecosystem and fully integrated tooling, including the ubiquitous-in-the-space Visual Studio IDE. In addition they’ve had two incredibly powerful programming models to draw on: Java, which C# was patterned on and which had serious deficiencies which C# has arguably fixed; and F#, a fantastic academic language based on OCaml that serves as a sort of “minor league” for C# features, trying these out before rolling many into C#.
Oh and also LINQ. LINQ is amazing and far too few people understand how insanely powerful it can be. If you’re learning C#, it is not strictly necessary at first, but at some point take the time to learn how LINQ providers work and how to write your own. You will up your game several times over.
It then sat on the shelf, barely used for anything beyond calendar widgets for nine years until Gmail introduced the world to the possibility of Ajax (they did not invent the term nor the concept, but credit where due for popularizing the technique and showing what was possible). It then tried to change way too much stuff at once, failed, and has only recently settled into a reasonable pace of gradual evolution. Just in time for WebAssembly to slowly start killing it off. Its freaking shocking that any of this worked at all!
C# is the better language.
But the language is not the whole story. There is also the community.
The entire .Net community I think pretty inarguably has been coddled nearly to death by Microsoft. This has had some very detrimental results
- The Alt.Net movement was necessary to bring ORMs, MVC, and inversion of control containers to the forefront
- It took over 10 years for Microsoft to finally have a unit testing framework and runner that was worth it for developers to use (and I still vastly prefer xUnit, and Testdriven.Net)
- Ditto for a package manager
- A single ORM rules the roost and even then a majority of shops don’t use one at all (and I bet I can mount a SQL injection attack easily against most of these).
- The majority of .Net developers don’t know how to use the command line
- The overwhelming vast majority of .Net developers don’t know how to extend the build system (And to actually bypass it because msbuild is terrible yall!)
That is not to say that things are completely bleak or not getting better, but the centralized, top-down nature of the ecosystem has created a strange lack of diversity and a certain intellectual non-curiosity among many developers that we are only now starting to see crack.
- Babel, Typescript, Purescript, and before that Coffeescript, competing for people who want a nicer syntax (and helping guide the evolution of the language as a reasult).
- Typescript, Flow, and Eslint for catching errors before running the application
- KnockoutJs, AngularJs, BaconJs, and Redux for state management
- AngularJs, EmberJs, virtual-dom systems like React, Backbone, and web components for templating and componentization
- Mocha, Jest, Jasmine, Qunit for unit testing
- and while Node is tops on the server it too had its predecessors in Rhino, JScript, and others
All this and much much more. This is the most successful programming community of all time. Definitely a worse language, but a many times larger, more diverse, bold, and rapidly moving community.
But really, nobody gets away with learning only one language, so just pick one and you’ll have time to get to the others. All of the others.
Now I had previously read this article, and did not care for it. I was snippy in the Quora comments
Turns out, the author of the Quora answer, and the hacker noon article were one and the same Richard Kenneth Eng. I’d really stepped into it now, as he responded with some additional citations and a reinforcment of his argument.
As my counter grew longer and longer, I figured I’d just post my thoughts here.
Dear Richard Kenenth Eng:
Ah! I didn’t cross-check the name on that article. So you’re someone with actual opinions not just parroting whatever they read on Hacker News. Kudos, and I apologize for being dismissive! We’ve got a legitimate debate on our hands.
Let’s start with the “People misunderstand JS” argument which you deride with
this, and inheritance simply go away. You can get very very far by only sticking to this path of variables, simple objects, and functions. You’ll be sitting down to write your own jQuery and micro-optimizing before you ever need to reach for a class or a prototype!.
Of course static typing makes some stuff easier. Of course it can be easier to navigage a program with types, it enables better tooling, and a compiler will catch a certain class of errors early. My experience working with beginners however, is that this is nowhere near as big a deal as you might assume. In fact, I find beginners have a very hard time reasoning about types when they are learning a typed language. I’m not sure why, but - again - my experience (and the fact that so many “scripting” languages are explicitly targetted at beginners) does not bear out the assumption that static typing helps all that much here.
Are you talking about more senior developers then? Well, hopefully you will agree that typing errors are in the overwhelming minority of bugs a developer actually has to worry about and that unit testing (and preferrably test/behavior driven development) are a must regardless. And at the point where you have reasonably high coverage, how much does it really matter if you’ve got a compiler checking all the jigsaw pieces fit?
You’re a Smalltalk guy and almost by definition experienced enough to formulate a reasoned opinion for yourself. The best I can do is to point out what seems to be an unsubstantiated bias and perhaps get you to agree that it’s possible typing matters less than you think.
So what about the community then?
Ok, here we get into a recent rant of mine. I think from the above you understand that I love and respect C#, so please understand the following in that context.
.Net has been out for what, 16 years now? Why the shit do we still not have a standard Currency type? Why do we not have something better than
DateTime? (Yes, I know about NodaTime, I’ll get to that later.) How is there literally no good option on Nuget for handling and converting units of measure? This is insane.
It’s not directly Microsoft’s fault. They’re under no obligation to flesh out absolutely everything, but the utter refusal of the community to coalesce around non-Microsoft solutions is a huge drag. Take the aforementioned NodaTime - its a fine library, but I still can’t persist a NodaTime object with the most popular ORM because EF does not support custom object mappings. I maintain that this is 100% the fault of the community. Forget that people can actually contribute to EF (and how many non-Microsofties actually do?), but if nobody tries to use non-built-in types then the EF team is never pressured to prioritize this feature to enable integration with libraries. So now we have a vicious cycle and I’m re-implementing timezone logic in every damn project out there. Its an absolutely absurd situation! There are no standard ways of achieving some of the most common operations in programming and people typically roll their own - always with eaily preventable bugs. If someone were to write an article cautioning people away from C# on those grounds alone, I’m not sure I could muster a counter-argument.
I was around during the Alt.Net movement and participated in many of the dicussions. Eventually Microsoft did the right thing, hired many of the loudest agitators and adopted many of their recommendations (Asp.Net Mvc, Entlib, Nuget, Entity Framework, MEF, Unity, Web Api, Psake, Git integration, and VsTest - all these things come out of their work). But dear god it took a long time, generated so much ill will, and had so many missed opportunities that many just flat out left .Net. And why on earth did Microsoft have to even be involved to begin with? Because the community is shockingly complacent and ok with not evolving. Even with an incredible language, C# always teeters on the brink of becoming the next Java.