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.
RE: Credibility destroyed
by Andreas Huber on Thu 5th Aug 2004 13:32 UTC

C++ templates are a compile-time feature much like a macro preprocessor and are thus not a good solution for a highly dynamic language such as C#.

C# is a multi-purpose language, parts of it are static (e.g. normal method calls are resolved at compile time) and parts of it are dynamic (e.g. with Reflection you can call any method on an object without knowing the objects' class).
This is a good thing because most of the time you are fine with static behavior and can thus benefit of compile time verification and good performance. Sometimes tough you need the dynamic behavior and are willing to deal with more errors at runtime and are also willing to sacrifice performance. Therefore, I absolutely don't see why generics should not be suitable for C#. It allows you to uncover more bugs at compile-time and improves performance in a lot of areas.

Eugenia: wild inaccuracies do not enhance the site's reputation. Nor does this nonsense generate any interest in C#.

If you accuse someone of producing wild inaccuracies you should definitely say what exactly those inaccuracies are and why you think so.

Regards,

Andreas