Re: Collections Improvement

From: UAError (null_at_null.null)
Date: 06/08/04


Date: Tue, 08 Jun 2004 11:29:04 -0400


"Disillusioned_01" <none@none.com> wrote:

>Anyboby aware of any MS initiative to provide an c++ STL
>stle Lib withc# Generics coming in .net 2.0!?(I guessed it)
>

There will be a generics version of the collections in the

System.Collections.Generics

namespace ,that much was suggested in Juval Lowy's article
"An Introduction to C# Generics" from August 2003

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/csharp_generics.asp

but nothing approaching the STL.

Generic Containers should perform better and are inherently
typesafe (no casting required).

You have to keep in mind that generics are not templates. If
I understand it correctly generics are not a feature of the
implementation language but of the IL - it would follow that
the generic data type is only expanded once the IL is
compiled to native code - delaying the potential bloat as
long as possible.

Generics only allow types as template parameters - so some
of the meta-programming stunts that Alexandrescu pulled in
his LOKI library just aren't possible with generics.

Meanwhile some people having been using this 'freeware
template-based code generator'

http://www.ericjsmith.net/codesmith/

to fill their needs.

Anyway read the above article and judge for yourself.