Saturday 26 May 2007
How to pollute C#
You can call me a purist but from my point of view the most valuable feature of C# is its consistency and explicitness. It seems that there are 2 teams at Microsoft that work on C#. One of them introduces great features like LINQ but the second one seems to support laziness of any kind and keeps introducing features that may(will) confuse software developers. Unfortunately it looks like the 'bad' team is not going to stop its activity. Their last idea which is called partial methods and is dedicated to code generator vendors smells like a C/C++ concept. Why? Because a partial method consist of method declaration(C++ header file) and method implementation(C++ cpp file). If you don't provide an implementation then the C# compiler will remove all calls to that method from your code! This means that your C# code that sits in a.cs file doesn't correspond to the C# code compiler sends to MSIL generator. Maybe it's me but I am not mad about at least half of the features Microsoft ships with Orcas(.NET 3.5).