Linked by Rüdiger Klaehn on Thu 5th Aug 2004 05:00 UTC
.NET (dotGNU too) One of the most awaited features of Microsoft .NET 2.0 is generics. Generics promise to increase type safety, improve performance, reduce code duplication and eliminate unnessecary casts. The most obvious application of generics in the framework class library are the generic collections in the new System.Collections.Generic namespace. Much has been written about those, but they are not the topic of this article.
Permalink for comment
To read all comments associated with this story, please click here.
Generics and C#
by Eric Gunnerson on Tue 10th Aug 2004 16:06 UTC

It's certainly true that the current constraint system of generics in .NET isn't as rich as it could be. We are exploring where it makes sense to extend it in the future, but there will be no changes to the current scheme in C# V2.0. Note that any change to the generics constraint syntax impacts all .NET languages, so it's not just a C# thing.

There's one technique to make it a little nicer to write such things, though the perf isn't up to a hand-coded approach. See http://blogs.gotdotnet.com/EricGu/commentview.aspx/0efca2aa-0c7c-4a... for more information.