A week or so back David Ing raised a concern that the new language features in C# 3.0 are bloating the language. Jim Downing adds to the conversation by asking if C# if Fit or Fat. I certainly understand their concerns, but for me, waiting for the new C# 3.0 features is like being a 5-year old on Christmas Eve knowing that the package in the corner is a Milleneum Falcon toy. I think Linq is overhyped, but the stuff they supposedly did just to support Linq is going to rock. The movement in regards to programming languages that I’m seeing is to pack more punch with less code weight, and I think the C# 3.0 stuff is going to help the mainstream move in that direction.
Lambda expressions. I’m using anonymous delegates quite frequently now, but the syntax is fugly. I’ve spoken with developers who won’t use them because they feel, with some justification, that the resulting code is just too unreadable. Lambda expressions are going to make the code noise go down.
Type inference. Again, this is going to reduce code noise – and without sacrificing static typed checks from the compiler. I love what Generics do, but the resulting code is also fugly. One of the advantages of a Ruby or Python over C# is the extra “noise” code in C# compared to duck typed languages. Type inference helps alleviate that issue in C#, especially with Generic type declarations.
Extension methods. Bring it on! I’ve been wanting them badly on my current project. I think the Fluent Language stuff we’ve been talking about the last couple weeks will be much easier to extend with extension methods. I thought of an extension method I want to add to RhinoMocks today for StructureMap integration in testing.
Yeah, it’s more things to know, and somebody is going to write truly atrocious code with the new features, but I’d rather have the sharpest tools possible and I’ll be responsible for not cutting my fingers off.
What do you think? Exciting new stuff or unnecessary cruft.