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.
@Zab Ert
by Rayiner Hashem on Thu 5th Aug 2004 20:26 UTC

* initializing a class dynamically: COM and sons, CORBA and sons, etc...
Both of which require extra-lingual functionality. If used with IDL (as both usually are), both are "grafted on," introducing their own types, own declaration syntax, specialized compilers (IDL compilers), etc. C++ does not allow you to load a class dynamically any more than asm does. It *can* be done in both, but it's not realistic to say-so because it requires significant support outside the language itself.

* runtime analysis and dynamic invocation: XTI
XTI doesn't exist in any usable form, yet. Maybe it'll be in C++ 0x, but it'll be 2010 at least before that get's widespread compiler support.

* template instantiation, yes, occurs at compile-time (so they are absolutely typesafe).
Type-safe templates in C++ are like airbags in a rocket.