Goto Blog Home PageRevell Research Systems: Alastair Revell's Web Log
On this page....
<February 2020>

RSS 2.0     Atom 1.0     CDF

Blog Roll
About Alastair Revell
Alastair Revell is the Managing Consultant of Revell Research Systems, a Management and Technology Consulting Practice based at Exeter in the United Kingdom.
Contact Alastair Revell
 EMail Revell Research Systems Limited Email Me
Legal & Other Notices
Sign In
The material published in this web log is for general purposes only. It does not constitute nor is it intended to represent professional advice. You should always seek specific professional advice in relation to particular issues. The information in this web log is provided "as is" with no warranties and confers no rights. The opinions expressed herein are my own personal opinions.

Web Log Home | Welcome to this Web Log | Using this Web Log | New to Blogs? | About Revell Research Systems | Contact Details

Review Entries for Day Thursday, January 18, 2007

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.

More about Alastair Revell

Thursday, January 18, 2007 1:05:42 PM (GMT Standard Time, UTC+00:00)  #
Comments [0] Coding | Trackback

Comments are closed.
RSS 2.0 Feed If you enjoyed reading an article on this blog, why not subscribe to the RSS 2.0 feed to receive future articles?
Revell Research Systems Logo Visit the Revell Research Systems Web Site if you want to learn more about this management and technology consulting practice.