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.
I completely misinterpreted your very first post. I did not realize that you quoted the first sentence from the article and therefore took it as your own writing. Out of context, I thought that you think that generics are not a good solution for a highly dynamic language like C#.
You are right that this sentence in the article is easily misunderstood. However, I think the author wanted to say that he doesn't want generics to be a compile time only construct as they are in C++ and Java (templates do not exist in the compiled code, only instantiated templates do, as normal classes and normal functions).
Chris:
I agree with you comparison macros vs. templates.
I completely misinterpreted your very first post. I did not realize that you quoted the first sentence from the article and therefore took it as your own writing. Out of context, I thought that you think that generics are not a good solution for a highly dynamic language like C#.
You are right that this sentence in the article is easily misunderstood. However, I think the author wanted to say that he doesn't want generics to be a compile time only construct as they are in C++ and Java (templates do not exist in the compiled code, only instantiated templates do, as normal classes and normal functions).
Sorry,
Andreas