[Mono-dev] Dictionary`2: optimized and serialization-compatible with MS.net
jonpryor at vt.edu
Mon Jun 11 21:54:36 EDT 2007
On Mon, 2007-06-11 at 14:50 -0300, Rodrigo Kumpera wrote:
> I don't know much about C# generics, but isn't it possible to use
> partial specialization like in c++ templates?
No. Partial template specialization, non-type template parameters, and
enough flexibility to accidentally create a Turing-complete compile-time
language (permitting template-meta programming techniques such as BLAST
and more) are all "advanced" scenarios that the design of generics
deliberately attempted to avoid because they were "complicated" (and not
needed by 95% of all programmers).
C# Generics and C++ templates share a cursory syntax, but that's the
extent of it. They're quite different, with generics being considerably
more limited than their C++ counterpart (and many will argue that this
is a Good Thing).
(Though those features sure are handy when you need them...)
More information about the Mono-devel-list