Is It Just Me Or Is .NET 4 Just Not That Special?

29 commentsWritten on May 25th, 2010 by
Categories: Opinions

I've been using Visual Studio 2010 for about 2 weeks now, and i've upgraded several of our projects to .NET 4 as well. I've noticed that i've hardly used any of the new features of C# or any of the new classes in the .NET framework. Granted, i don't have a very thorough knowledge of everything that's been added in C# 4 and i don't know all of the new classes in the .NET framework. But i do know something about the new stuff, and so far, i haven't really noticed anything compelling. Nothing that made me think "this is awesome!".

I looked at the new WCF 4 features so i could see how Agatha could benefit from it, but apart from the improved REST support (which Andrew Rea is working on), there's nothing that Agatha could really benefit from. Perhaps maybe the fact that you can reduce XML configuration for your WCF services but then again, the amount of XML config that you need for Agatha is already very limited compared to typical WCF services and the parts that you do need are things that i actually prefer to see explicitly in a configuration file instead of hidden away in some infrastructure assembly that your project is using.

As for the new language features... i like the whole dynamic thing, though i haven't found a need to use it yet. The next time i see some old reflection code i'll probably modify it to use dynamic, but i don't really need to use tricks like that very often. Optional parameters are something that i can't really get excited about, perhaps because i hardly ever use interop and more likely because i still believe in meaningful method overloads. In fact, it sometimes makes me think that C# 4 is moving closer to Dysfunctional Programming as opposed to at least being influenced by Functional Programming in C# 3. Named Parameters is something that i can see myself using to increase readability when it comes to using multiple overloads with confusing method parameters but that as well is something that i don't frequently run into.

The greatly improved support for parallelism looks very nice, though i haven't really needed that either. The new thread-safe collections look nice too, though every time i want to modify some code to make use of it, i notice that i typically need my locking to be just a bit more coarse-grained than what i can get from the new collections. Unless i haven't looked hard enough of course, which is certainly possible.

As for Visual Studio 2010... from a performance point of view it is somewhat better than i expected but i really can't say it's an improvement over Visual Studio 2008 (again, from a performance point of view). I occasionally notice about 25% CPU usage (on a quad core system, so that's pretty bad IMO) coming from devenv.exe while it isn't actually doing anything. I can't really say that i'm happy about that. The default color theme looks butt ugly IMHO, but at least there's a plugin to change that. Which i haven't actually done yet though :)

Now the thing is... maybe it's just because i haven't looked hard enough, or that i'm missing some cool new stuff, but isn't this very different from when .NET 3.5 came out? The Linq extension methods and the ability to use Expressions was highly welcome and i guess a lot of us kinda went overboard with it (and some probably still do). But at least that showed that those new features were not only highly welcome, but very popular and in general just great new additions to the C# language. But with .NET 4 i really find it pretty hard to find anything to get really excited about. And just to be clear on this: that's not to be critical of Microsoft or anything like that. But i'm just wondering: "is it just me or is this really not that special?"

So what do you think? Are there great new additions to C#/.NET that i'm probably missing and that you are enjoying a lot? What are your favorite additions to the platform? Or are you, like me, not really all that excited about the new stuff?

  • http://bryanmitchellanderson.com/ Bryan Anderson

    Code Contracts are the feature I love the most in .Net 4.0 although I have a feeling Reactive Extensions will be up there too once I get a chance to give them a run through.

  • Benny Michielsen

    Covariance and contravariance!

  • http://odalet.wordpress.com Olivier DALET

    Well for my part, the only feature I really appreciate is the Tuple class… And yes I admit, it is very little compared to what .net 3.5 brought to us.
    It should also prove far easier to develop Office interop apps thanks to the dynamic keyword, the optional parameters and the embedded generated interop code, but I didn’t have
    the opportunity to use it yet.

    Regarding this last issue, I have to say I admire how Microsoft provides entire new ways of developing just with a few language enhancements that taken one by one may seem minor features. For example the whole Linq story was built on top of very few additions to the languages (in fact more syntactic sugars than real deep modifications): var, extension methods, lambda syntax! And with .net 4, though it is not as huge, it is the same process: Tuple was extracted from F# – maybe F# support in VS IS the real new stuff, and dynamic from the DLR.

    I suspect that the big changes happen under the cover (IL, CLR, side by side hosting).

  • Dale

    I find great stuff there. However, I’m not sure why incremental improvements are a bad thing – do we really need to be blown off our seats to welcome the release?

  • http://cyrilgupta.com Cyril Gupta

    Parallel Programming is something I am excited about more than all the other features. As an app developer I’ve thought of many places where it can help me. But the other features sound useful too. I’ve just started making my first project in .Net 4, so I will wait a little while before commenting.

  • Peter

    Are you sure that the 25% CPU isn’t caused by some plugin like resharper?

    As for changes, you’ve only talked about the BCL (and forgot Workflow) but a lot has changed if you’re using TFS 2010 (I know you don’t) but for me TFS 2010 is the biggest improvement.

  • http://dgoyani.blogspot.com/ Dhananjay Goyani

    >>> isn’t this (.NET 4.0 release) very different from when .NET 3.5 came out?

    .NET 1.x to 2.0 => cool features and lot of CLR improvement. I learned somewhere Anders saying that he wanted to put generics in the first version of .NET but due to time constraints and other reasons had to postpone it to 2.0

    .NET 2.0 to 3.5 (skipping 3.0 intentionally) => a game changer release with blasting LINQ. By LINQ I mean everything – dlinq, xlinq, olinq, lambada expressions, predicates, etc. Now if you think this as an incremental release, probably that is not 100% right. LINQ, at the concept level (ObjectSpace), was been started since 2000/2001. It was being worked upon parallel to 1.1 through 3.0. Just that the whole LINQ thing landed up in 3.5. If at all I want to compare, I would say 3.5 is about object initializers, extension methods (great enabler for linq), anonymous types, etc.

    .NET 3.5 to 4.0 => In just 2 years a new release with bunch of features. Nothing very cool – may be because MS developed and released all their power features in 3.5.

    VS 2010 performance => I understand you (being hardcore geek) benchmarking and comparing it with 2008 but again they both are developed using different techs – winforms vs wpf. May be, at least I haven’t heard anybody saying so but just a guess, the 25% usage is because of wpf being at core.

    >>> Is It Just Me Or Is .NET 4 Just Not That Special?
    just that your expectations are high. ;-)

  • http://davybrion.com Davy Brion

    @Dale

    no we don’t need to blown off our seats, i just found it sorta weird how .NET 3.5 made a huge impact on the way most of us write code every day and i don’t think .NET 4 will come even remotely close to that (except for a handful of scenarios). But no, there’s nothing wrong with that.

    @Peter

    I can’t be entirely sure about it not being caused by resharper… As for Workflow, i don’t use it and i never will (how will i know that you guys won’t break it again with the next update?). And TFS is something that i really can’t consider to be a part of .NET 4…

  • http://weblogs.asp.net/koenv Koen

    Me 2: co- and contra-variance ++

    Maybe the most wanted feature in this release.

  • Henning Anderssen

    I must say I agree with most of what you say. My experience with .NET 3 and VS2010 is rather limited, but I have briefly looked at it.
    The first thing I can see myself using is named parameters, but I’ll never ever use optional parameters. I think that if you decide to use them because of numerous overloads you probably have a design smell.
    Covariance and contravariance looks nice though.

    As for VS 2010, the thing I’m the most exited about is the multiscreen support, although not exactly what I was hoping for it is way better than what VS08 has to offer (which is none). I have 3 screens, and having my backlog items on one screen, my code on the main screen and maybe debugger or something else on the third screen. mmmmm, heaven :D

  • tcmaster

    I think MS maybe have gotten used to publishing good things in x.5 version :)

    As to C# features, I think it’s too much than necessary, while the framework library is not so good composed. Do we really need to push everything into language instead of a good library?

    As to VS, it’s never a great IDE, good, maybe, but not great. Comparing to the Java counterparts, VS is just next to notepad. (exaggerating, with R#, it’s close)

  • http://gabriel.lozano-moran.name Gabriel Lozano-Moran

    The CLR changed drastically so they could not call it .NET FX 3.6 or even .NET FX 3.5 SP2. As to Visual Studio 2010 I love it. I notice no performance decrease compared to Visual Studio 2008. Most of the times I have Visual Studio 2010 open and a couple of VM’s (VMware Workstation). With the devenv.exe process on the foreground my CPU usage ranges between 0% and 5%. About the default theme, event that I like.

    About the new language features I have no real comments. EF4 still sucks and is still too complex even for the most simple scenarios. It is as if they haven’t really tested it for real life applications that use more than one layer and if they did I would like to know how they did their usability testing.

    We also use TFS 2010, iteration planning still sucks big time.

    I believe that the most significant changes are the CLR and the new Visual Studio IDE. I also like the fact that we can developer Shell extensions now in managed code.

    As to your performance problems with Visual Studio 2010, maybe it is time to format your PC and perform a clean install? Maybe it is not the Visual Studio 2010 IDE maybe it is an extension that is utilizing so many resources on your machine? It is not R# because I have that installed as well…

  • http://davybrion.com Davy Brion

    @Gabriel

    resharper and visual svn are the only addins i have installed… the background cpu usage is not constant though… it just happens once in a while, takes about a minute and then stops again… maybe it’s just GC’ing all of the unnecessary WPF stuff :p

  • http://gabriel.lozano-moran.name Gabriel Lozano-Moran

    Well in that case, maybe it is time to invest in RAM? With Process Explorer you can see what the Current Commit Charge is. If you have for example 4GB of RAM and your Current Commit Charge is higher or the Peak Commit Charge is also a lot higher, than your system does not have enough memory.

    Other thing you can try: In Tools => Options => Environment => General, there is an option to disable the usage of hardware graphics accelaration and to disable the rich client visual experience. You can try that and see how that works for you.

  • http://davybrion.com Davy Brion

    @Gabriel

    thanks for the tips :)

    though i can’t help but wonder why i should have to look into this considering that Visual Studio 2008 didn’t have this problem

  • http://gabriel.lozano-moran.name Gabriel Lozano-Moran

    Because sometimes things don’t go in life as you want them to go :-)

    A recent example I can give is about 2 weeks ago I assembled a completely new PC with a Gigabyte GA-X58-UD7 motherboard and I was having problems with a D-Link DWA-556 WIFI card built. According to the docs this card is compatible with PCI Express x1, x8 and x16 slots. I had to partially disassemble the passive northbridge cooler of my motherboard to fit the D-Link DWA-556 into the PCIe x1 slot of the motherboard because it just would not work in any of the other PCIe slots. In an ideal world I would have just plugged it into one of the 2 available PCIe x8 slots or the extra PCIe x16 slot and I would have saved myself days of headache.

    I am just trying to say that because Visual Studio 2010 comes with a whole lot of new WPF design improvements that Visual Studio 2008 did not have, you might be seeing issues on your machine that are totally unrelated to Visual Studio 2010. Maybe you are running outdated drivers. Or maybe you are running the latest drivers for your graphics card but for some reason combined with your specific graphics card it is giving problems on your machine. Fact is that I am running Visual Studio 2010 on several workstations and 1 laptop and I am not really seeing any performance issues.

  • http://davybrion.com Davy Brion

    i understand what you’re saying but i simply refuse to accept that outdated gfx drivers should _ever_ negatively impact the performance of an IDE :)

  • http://gabriel.lozano-moran.name Gabriel Lozano-Moran

    “Resistance is futile, you will be assimilated”

    Or there is always “Mirador” as an alternative:
    http://build.sharpdevelop.net/BuildArtefacts/

  • Stuart Laughlin

    i understand what you’re saying but i simply refuse to accept that outdated gfx drivers should _ever_ negatively impact the performance of an IDE

    Then clearly you are using the wrong IDE, Davy. :)

  • http://davybrion.com Davy Brion

    @Stuart

    no i don’t think so… apart from performance issues, i actually like visual studio. i like the way it works and i like the way it enables me to work (provided that resharper is installed). MonoDevelop or SharpDevelop simply don’t cut it for me. That said, unless the IDE had some impressive graphical effects (which it doesn’t), there really is no valid reason whatsoever for it to have problems with outdated gfx drivers

  • http://gabriel.lozano-moran.name Gabriel Lozano-Moran

    Well think about it like this. Assume that the average development workstation is leased by companies for 2 years and most “big” companies use workstations of the bigger brands such as HP, Dell … Now also assume that it takes 6 to 12 months before these companies actually upgrade to Visual Studio 2010. By the time they upgrade we can more or less assume that in most cases Visual Studio 2010 is going to run on faster hardware, meaning faster CPU, faster GPU, more RAM …

    Unfortunately, you need to go with the flow, that is to buy a new development workstation every 2 years and then you should not notice any performance decrease between Visual Studio 2010 and Visual Studio 2008. But then again, I have a cheap laptop that cost me 499€. I bought it in the Mediamarkt about 6 months ago. It is the HP Pavilion DV6-1220sb that I use as a 3rd development machine. It comes with a Dual Core CPU T4200, 4GB RAM and a low-end graphics card Radeon HD4530. I don’t notice any real delays with any of the editors. The only thing that are slower compared to my other machines are the build times for large projects.

    That is why I am thinking that the problem you are having with Visual Studio 2010 are not related to Visual Studio 2010 but to your specific machine.

  • http://iceagetrail.posterous.com Clay Shannon

    <>

    This is an insensitive and politically incorrect remark! What have you got against butts? I’m shocked, saddened, and ashamed! Butts of the world Unite!

  • SeeR

    I have similiar feelings about “dynamic” keyword.
    What would be really usefull are static virtual methods.
    Combined with interfaces and generics this will allow to unify operators and other static methods usage.

    But of course this will require another changes in CLR and dynamic keyword requires compiler changes only. :-(

  • http://iceagetrail.posterous.com Clay Shannon

    I meant to quote your unbelievably irreverent and caustic declamation:

    \The default color theme looks butt ugly IMHO\

    Have you finished flogging yourself with a wet noodle in penance for this grievous and atrociously cheeky sin yet?

  • https:://bjdavidson.wordpress.com Blair

    I happen to agree. There is nothing earth shattering in .NET 4. Sure some things are nice like, having a new runtime, TPL, linq enhancements, dynamics, option paameters but I really do not care about them.
    Linq changed how I work and made my code my functional.
    I do not care about dynamic or optional ect.
    I’ll TPL when I need to.

    A new runtime is nice cause It is new and shiny. But nothing ground breaking. Still its good to see things progressing.
    Personally I hate the look of VS 2010. VS 2008 feels better for me.

    I wish a new VS was not required when ever we have a new release.
    Just a MS Marketting thing.

    I will use the new stuff I just dont find it that compelling.

  • http://blog.invalidoperation.com Ray

    It’s not just you, it’s just the 4th major revision of a product from a company that very often tends to have very solid 3rd revisions. Maybe wait until .Net 6?

  • Klinger

    IMHO .Net 4 is just the infrastructure for the next version.

  • http://bj.ma Ben Aston

    The improvements in multi-threading support (Parallel Extensions) are a significant step forward given the stalling of processor clock speeds and the resulting explosion in number of processing cores… so I’m afraid I have to disagree.

  • http://bj.ma Ben Aston

    …plus the inclusion of F# as a fully supported language is arguably another important step. (sorry for the double post)