So I had a chance today to attend a session given Anders Hejlsberg on C# 4.0, and beyond.  Honestly I walked out of the session going … that’s it?  The feature list started with the dynamic keyword, which is cool but simply does not help the 80% of C# developers today.  Most C# developers today are so bound to type safety that dynamic will give them even more heartburn than var did.  Now in reality it will likely make scenarios like property movement from service contracts to domain objects easier, but all its really doing is the same thing I blogged about the other day when working against .NET types, just with more layers and interfaces so that it can be built into the language directly.

The next big thing mentioned was Named and Missing parameters.  In the talk be mentioned that these should have been there long ago and he’s absolutely right about that. As such, you’ll get no big congratulations from me.

What else?  Co-variance and Contra-variance of course … a couple of things on this.  First, I don’t think a lot of people will care.  Second, perhaps I’m slow but I have no idea why a new keyword is needed for this.  If a type is being used only as an input, then the compiler can detect that and add the “in” keyword, and if it is output only, then add “out”.  Why do I need to personally decorate this?  Are their edge cases? Probably, but then have an opt-out model where you can take direct control only if needed.

The C# 5.0 stuff about the compiler as a service is … sexy.  That is a concept that excites me, but that’s just teaser stuff right now and they have no idea how/when they’ll deliver.  But what about other stuff?  How about extension properties?  What about interface inference (which is a major step towards duck typing)?  I don’t see a bunch of “type safe” enterprise developers getting excited about C# 4.0 as presented.  They might think its cool, but will they use it like they use automatic properties or LINQ?  I think not.


Technorati Tags: pdc2008,C#