I’ve been following with interest various articles that have been published about the addition of Generics to .Net.

When I first saw the template classes in C++ I thought they were incredibly useful and cool - until I saw that they were essentially a trick of text processing. The gloss went right off them then.

In C#/.Net, Generics are going to be a first class concept - supported at runtime, not compile time. This means that if my assembly creates a generic list of Controls, and your assembly also creates a generic list of Controls, then both assemblies will share the same implementation. The consequences of this include a massive reduction in code bloat, not to mention the reduced load on the processor’s code cache.

Brad Adams has posted a short article to his blog detailing the use of Reflection to see how Generics are actually implemented. Interesting stuff.

Comments

blog comments powered by Disqus

Next Post
How important is assembly language  07 Feb 2004
Prior Post
No more Applications  18 Jan 2004
Related Posts
Dependency Injection: Views  17 Aug 2019
Dependency Injection: ViewModels  10 Aug 2019
Dependency Injection: Core  27 Jul 2019
Integration Testing  20 Jul 2019
Restructuring Reducers  13 Jul 2019
Vocabulary Browser  29 Jun 2019
Revisiting ViewModelBase  15 Jun 2019
First Light  08 Jun 2019
Add Word View  25 May 2019
Add Word View Model  11 May 2019
More csharp posts »
Archives
January 2004
2004