

Ask HN: Why isn't C# recommended more often? - naithemilkman

As a 'business guy' teaching myself to code, I have inadvertently started on C# due to the support group around me.<p>I always see ruby/php/python as the de facto recommended languages to learn if you want to start programming.<p>So my question is, why not C#? Is is because its not 'free'?<p>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.<p><i></i>UPDATE<i></i>
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?
======
jawngee
Tons of reasons:

\- 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.

~~~
jawngee
How about next time, you refute me instead of voting me down. I will pit my 9+
years (since .NET 1.0 Beta 1) of experience with C# versus whatever you would
like to bring to the table for discussion.

~~~
retroafroman
I'm not sure why you were downvoted either, but I suspect it's because you
weren't very nice in your (very true) presentation of the pitfalls of using C#
as a general purpose, learning language. Many people on HN don't respond well
to anything that sounds angry, I've found (through being thoroughly downvoted
myself).

------
mathgladiator
C# is bad to learn first because you have to learn the IDE, you have to learn
a lot of concepts up front, and you have buy-in to the way C# does things
(static types, class hierarchies).

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.

------
torial
C# is a decent language to use, and has evolved rather rapidly over the last
few years. I remember in the 1.0 (and even PDC days) when C# came out as
essentially a Java clone, and to find out about how to use classes I'd find
the most help from Java documentation! Now it is a different beast, and has
become more usable, and lots of the changes have made it more useful and
faster programming.

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.

------
retroafroman
The issue of it not being free is part of it, but there are some other reasons
as well:

-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.

~~~
HeyLaughingBoy
C# is free: I use Visual Studio Express at home (both C# & C++) when I need to
build a desktop app and there's nothing I've needed that it couldn't do.

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!

~~~
retroafroman
It is available freely (free as in beer), but it's not an open source language
(free as in freedom), which is the free I was referring to. Sorry about that
ambiguity.

~~~
xorglorb
Actually C# (the language) is libre, it's an EMCA standard. The default
implementation and IDE(the MS runtime & VS) is not libre, it's gratis, but
Mono is fully free software (libre) and nearly fully compatible (both source
and bytecode) with the MS runtime and will run on Windows, OS X and Linux.

~~~
retroafroman
I wasn't familiar with the language spec being open, thanks for pointing that
out.

------
sosuke
I agree with your last statement naithemilkman. Learning your first
programming language will be the hardest part much like learning your first
primary language. You will pickup all the basics and rules while learning how
to think through a program. If you have a support group the knows and
understands C# then that seems like a good choice for you.

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.

------
oomkiller
Never used C# personally, although I have considered picking it up. I am
guessing that it is because C# is 'tainted' by Microsoft.

