Ask HN: Why isn't C# recommended more often?
As a 'business guy' teaching myself to code, I have inadvertently started on C# due to the support group around me.
I always see ruby/php/python as the de facto recommended languages to learn if you want to start programming.
So my question is, why not C#? Is is because its not 'free'?
I'm starting to think that it doesn't really matter what language you start learning. Just start and you'll be 95% ahead of most people already. Especially if the intention is to develop a prototype/MVP and not attain CTO standards.
UPDATE While Im at it, how much of my C# knowledge can I port over to languages like Python/Ruby/PHP? From what I understand that knowledge of libraries are one of the time consuming aspects of learning a new language. Is is really that bad?
20 comments
[ 2.0 ms ] story [ 65.3 ms ] thread- The write/build/test compile cycle is slow as f-ck
- C# isn't really all that supported outside of Windows, which sucks for server centric apps. Yeah, you can use mono, but why?
- C# is grossly verbose in contrast to ruby/php/python
- PHP is instant gratification. Change, reload browser, lather, rinse, repeat.
- Lack of open source libraries + libraries you have to pay for = suckage
Really, though, C# and .NET are the frontier of lowest common denominator developers. The kind of dudes that wear teva sandals with socks and tucked in short sleeve shirts. You can also call them copy and paste developers, because that's essentially what they are. Most of the innovation in the last 5 years has come from the open source camp, not the corporate drone MS army.
I used to be a .NET developer, btw. Wouldn't touch that shit with a 10 foot pole these days. Not a chance in hell.
I thought that you brought up accurate and true statements, even though they seem more like an argument against compiled languages as a whole.
why not "hot deploy"?
hot deploy doesn't work when you're working with other developers who are violating the JEE spec (mainly by starting their own threads.)
Now I have to wonder if you're being serious.
You have basically just thrown your biased opinion, making a lot of generalisations.
"The kind of dudes that wear teva sandals with socks and tucked in short sleeve shirts. You can also call them copy and paste developers, because that's essentially what they are"
I am shocked to see you get upvoted after making the kind of a statements that you did in your post. I expected better of HN.
asp.net is a nice platform, i admit but i will still recommend php/rails for beginner.
-Not built in - python is included by default on all major Linux distros and OSX, as well.
-Interpreted languages have instant gratification, which is helpful in encouraging beginners.
-C# isn't often used for web programming, which many people on HN are focused on.
And you do have a good point; once you start, you become miles ahead of never learning anything about programming.
I see the issue as really being about what kind of programming you want to do. If I'm writing a Windows desktop app, my choice will be C# simply because it's easy, available and I don't need to learn a new GUI library. But it's the last thing I'd consider for a Web project.
OK, not always the last thing. A week ago I did a quick experimental Web based interface for some hardware we build here at work. It was my first .ASP project and I was amazed at how trivial it was to make a .aspx page backed by C# connected to a COM object that talked to the motion controllers. Say what you will about Microsoft; they do make the go-path easy!
I've really enjoyed learning and using C# myself and I try to keep out of the politics of one language or company versus another when it comes to the languages. It's helped me that I work in a C# web development company so I have a large support group as well.
You've already got the right idea, pickup one language and stick with it and you're on your way to developing those prototypes.
Where as over in the other camp, you can just write code and run it. There is more coding and experimentation rather than learning tombs.
Compare
hello.js: console.log("Hello World");
> node hello.js
With
hello.cs :
using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine("Hello World"); } } }
Then compile it and run it.
One of these is more fun, and one of these is easier to document and write tutorials around. If you have to deal with this day in and day out, then one is going to be preferred.
Since 2.0 VB.Net has started falling behind, for example not getting the "yield" convenience that C# got. So on the MS provided languages, C# is continously getting better than VB.Net, and you'll hear even less advocacy for VB.Net!
That said, the .Net framework can be used with more interesting languages (my preferred one is a python-like language called Cobra: www.cobra-language.com) and the primary loss in the equation is the Visual Studio environment (although MS is making it easier to write language extensions in 2010 version). So you can use an excellent framework with many other languages.
So then what you are left with is the language itself. I can't speak for others, but the script-like syntaxes speak to my brain more naturally than C-like languages, and I have found that I am most effective in thinking in a language like python than I am with either VB.Net or C#.
Part of the appeal that python/ruby have is they typically come with the non-Windows OS a person might use. For instance Python comes out of the box with OS X and most *nix OSes.
You are right on the abstracting what you've learned. It is true for a general language family, and less so (but still helpful) when you cross families. By that, if you stay in the procedural/OO realm of languages, you'll notice lots of similarities, but if you branch out into functional languages it will be very different.