
C#, I still love you dearest - charlieflowers
http://blog.tnwdevlabs.com/2015/07/01/C%E2%99%AF-I-still-love-you-Dearest/
======
earlz
For all the shit I give C# (some of my complaints are getting better with
everything becoming open source), it's still by far my favorite language. I
picked it up when Visual Studio 2008 was relatively new and coming from PHP
and C++ (to ASP.Net/C#) was very eye opening and though I had a lot of
learning problems because of webforms, the core C# language definitely has me
captured.

C# is my "not quick one off" language. When I want a one-off, I use Ruby
because it's quick and easy... but when I need more than 1 file and I'll be
dealing with lots of classes and complications that come with that, give me
C#.

I've tried getting to know Rust, but despite my love for it's core ideas and
syntax I just can't get into it for the projects I've had. Most of my projects
don't tend to be things where I care about strict memory requirements or
ridiculous performance. I mainly just want something that works good enough
for my own use.

I also tried Go, but I quickly left that when I found it had no generic
support and the community is basically anti-functional constructs, preferring
pure procedural stuff instead.

~~~
jameshart
Your reference to 'more than 1 file' resonates with me. One thing C# gets
wonderfully right is its approach to spreading code across multiple files. No
dogmatic insistence on one class per file like Java; no file-level dependency-
graph import/export nonsense; no compile order dependencies; with partial
classes I can split code up logically across files if I need to. I can start
off and build multiple classes all in one file to get my initial framework and
patterns together, then I can refactor those classes out into their own files
over time.

------
billyhoffman
"JavaScript has the better object model"

This might get downvoted and all but ... I'm not sure how someone who has
written C# for 8 years would think this.

I'm not even talking complicated things. Just OO basics like interfaces and
abstract classes (with compile time enforcement) are pretty helpful as you
evolve a code base.

~~~
Touche
C#'s object model is so good they created dynamic so that people don't have to
use it...

~~~
moron4hire
Only people who don't use C# regularly think `dynamic` is something C#
programmers use regularly.

~~~
earlz
This is true, but I've seen libraries that lazily use dynamic in their API
instead of properly implementing things with generics to accomplish things.

Also, the way the various Microsoft frameworks use strings to specify property
and type names drives me insane. It's just like.. "Hey, we have a really nice
type and generics system... but here lets hop around that and instead use
strings that we hope you never need to refactor, as well as magic method names
(ie, RegisterRoutes, Application_Start)". This seems to be getting a little
better, but it's still way too prevalent. It's almost like the people
responsible for writing C# frameworks had a disagreement over strict typing
and decided to just contaminate a ton of APIs to spite the type system.

~~~
moron4hire
Well, to be fair, a lot of those got started back in the pre-generics 1.1 era,
and the rest are designed to have a similar interface.

------
bkjelden
The C# language designers really do a great job maintaining the perfect
balance of language features.

C++ allows way to many things and no normal human could ever hope to
understand the entire language.

Java went too far the other way - it was so simple you ended up with a lot of
boilerplate code (although this has supposedly gotten better since I last
wrote much Java in Java 6).

C# gets the mix just right.

~~~
joshuapants
> it was so simple you ended up with a lot of boilerplate code

Lately I've been seeing C# as having that same affliction (though not nearly
to the same extent). It all started with perusing some F# code samples, then
following a few tutorials, and now C# is ruined for me forever.

~~~
jimmaswell
Shorter or less boilterplate isn't necessarily a good thing. C#'s greater
explicitness can make it easier to keep track of what's going on
comparatively.

~~~
bkjelden
Just like with features - explicitness vs conciseness is a tradeoff language
designers have to walk. I feel like, in general, the C# team does a great job
balancing things.

------
charlieflowers
C# replies: "Honey, I don't mind you dallying with some of those sexy other
languages. Just make sure you bring some of the learnings back so you and I
can enjoy them together <wink>."

------
Touche
If you're in .NET land I have no idea why you would chose C# over F#. F# has
ever thing that C# has and more, and does so in a more elegant way.

For example, C# async/await is a compiler hack. In F# it was implemented _as a
library_. This shows how powerful F# is and C# is not.

~~~
ianlevesque
C# tooling is better

~~~
miscfuck
Definitely, why in the hell do my files need to be arranged in compile order,
that's absurd.

------
brianbarker
Now that MS is playing great with Linux, it's hard to justify moving away from
C# for common web tasks. My biggest issue was not wanting to deploy Windows
servers (for my own projects; my company pays for it without issue).

Credit is due to MS for learning to adapt to demand, not fight it.

------
brendanjerwin
"your special son PowerShell can live with us for as long as he needs, even
indefinitely" \-- Ha!

~~~
sremani
The Camelcaseness of Powershell might be the reason for this expression, but
if you dev on Windows, Powershell is just indispensable.

------
swalsh
I recently switched to Ruby after writing C# for 8 years. There's a lot I
miss, the tooling is best in class, and the language is very well thought
through. I might go back some day.

~~~
keithly
Why did you switch?

~~~
swalsh
I followed my boss to a new company, and Ruby is what they were already using.

------
douche
If you're stuck with a shop that transitioned from VB6 to VB.NET, then yeah,
.NET sucks, because VB.NET sucks. C# is without a doubt my favorite language.
I could probably live with Java, if I could use IntelliJ, although I would
miss LINQ and dealing with the "one class, one file" rigidity again. I used to
dabble a fair amount in Python - at the time, I was coming from working mostly
in C++ or Java (1.4 or 1.5), so Python 2.5 seemed like a breath of fresh air.
But the tooling is just not at the same level as exists for C# these days.

The two biggest pillars of my experience developing C# though are ReSharper
and NuGet. Resharper is without a doubt the best couple hundred bucks I've
spent on programming tools (if only they didn't always seem to release updates
seemingly the day after my year of free point releases expires...). And Nuget
is the best thing since sliced bread. I don't think I would ever want to go
back to trying to manually manage and install third-party libraries the way I
used to have to when I was doing Java and C++ ten years ago.

------
skrowl
I love C# because MS stack is where the enterprise jobs are (at least in my
area).

~~~
cmdrfred
This is also the reason for my disdain.

~~~
archon
I don't understand this. A language's popularity with large businesses is
enough reason to dislike it?

~~~
cmdrfred
Just wish it was something more fully open source, I don't like to be locked
in to a single companies way of thinking.

~~~
skc
It's just a programming language, use it as you see fit.

------
m_st
For me it's 10 years. Also with .net 2.0 and the generics through Visual
Studio 2005 getting data from SQL Server 2005.

To another 10 years!

~~~
moron4hire
I was somewhat shocked to recently realize I've been doing both C# and
JavaScript since they were invented, so 15 and 20 years respectively. It's...
not as awesome as I first thought.

C# has evolved greatly in 15 years. JavaScript is only just now seeing any
useful change.

------
o_nate
"JavaScript has the better object model" \- hard to take anything else he says
seriously after reading this, but it was funny.

------
jbeja
If this by causality u/agleiv2 form Reddit?

------
cmdrfred
This is how I feel about Python and Pycharm. .NET feels antiquated to me and
the culture of the language (lots of former MBA guys who learned visual basic
in excel as a first language) doesn't have the same spirit as Python, Ruby, or
Go (or C, C++, or assembly for that matter) but to each his own.

~~~
recursive
So the reason .net feels antiquated is purely a function of the other people
who use it. That sounds like something a Ruby programmer would say. ;)

~~~
cmdrfred
It's mainly what its used for, if you want to make pretty graphs and keep
track of materials at your factory maybe you pull out .net if you want to do
something interesting you use pretty much anything else. I know tons of people
make a living with it, but I don't understand the passion for the language.

~~~
recursive
It's a programming language that expresses logic. The interesting-ness of the
domain is not related. You can solve any kind of interesting or uninteresting
problem in any non-trivial language.

------
hoare
its a shame that 99% of the startup scene gives you a very strange look if you
say you want to do the job in c#:(

