I have been porting our code library to the .NET Framework 2.0 and have been using the new generics feature in many places to improve the code.
I've generally been impressed by the functionality offered by generics, but was a little disillusioned when I realised that they would be of little or no use in refactoring our matrix and vector maths libraries.
Perhaps, as a graduate mathematician, I had been more excited than most by the prospect of being able to write generic matrix and vector classes that could be instantiated just as easily on a built-in Double type as a custom Complex number type.
However, the gradual realisation dawned that the built-in types in the .NET Framework don't share any common numeric ancestor type and don't implement a common interface such as IArithmetic that might be used to constrain the generic matrix and vector classes to being instantiated ONLY over numeric types.
Rüdiger Klaehn, a German freelance programmer, has proposed that Microsoft should augment the basic numeric types in the .NET Framework with an IArithmetic interface that would define the basic arithmetic operators on these types. This would allow generic types to be defined over types that guarantee this interface, allowing such classes as a matrix or vector to be built that can be constrained to types that support basic arithmetic.