tags:

views:

917

answers:

4

Hi, first of all let me say that I know about dynamic, no PIA, named and optional parameters and finally covariance and contravariance.

In my projects 99% of the time my code is in C#, I almost never do Office automation, I don't plan to use any dynamic language any time soon, and, besides being necessary for Office automation, I think named and optional parameters are wrong (and no, overloads do not count, if you have that many overloads the problem is in the design, not the language).

So whats there for a C# guy in a static-typed world?, The only thing appears to be covariance and contravariance, which sounds great, but I was hoping something more. The only bits that I'm excited to try are the parallel extensions for Linq but that's about it (and that's [available for 3.5 as a CTP).

Why are you exited about C# 4?

+6  A: 

The only thing to be excited about in C# 4 from a non-COM, non-dynamic standpoint are covariance and contravariance. Everything else is centered around dynamic typing.

Andrew Hare
"dynamic programming?" Dynamic typing seems to be a better word as dynamic programming is mostly associated with the problem solving strategy: http://en.wikipedia.org/wiki/Dynamic_programming
Mehrdad Afshari
Good catch - I have edited my answer.
Andrew Hare
Optional parameters and named arguments aren't about dynamic typing.
Jon Skeet
+4  A: 

There's a new chart control now in the toolbox... yea I got nothin else..

BFree
+11  A: 
  1. Better Garbage Collection

  2. New Thread Pooling Engine

  3. Code Contracts

  4. If you're not doing ASP.NET WebForms development you wouldn't care, but, there are significant improvements there as well.

Learning Resources for .NET 4.0 New Features

...hit the link for some good resources about some of the new features.

Justin Niessner
good point about code contracts
Juan Zamudio
+1 for Code Contracts (not a language feature per se, but close enough)
Gabe Moothart
Yeah...I included framework features too.
Justin Niessner
Hmm... those are all very cool things but none of them are language features.
Andrew Hare
I upvoted your answer because you bring some important points, but selected Andrew's answer because the question was for C# 4 features
Juan Zamudio
+5  A: 

Really optional default parameters, co/contravariance (has been an advantage of Java) and the ParallelFX.

Dario
+1 optional default params
kenny
+1 for ParallelFX
Joel Coehoorn