Re: Delegates, Generic Methods and algorithms - Functional versus Procedural
- From: Marc Gravell <marc.gravell@xxxxxxxxx>
- Date: Sat, 19 Jan 2008 01:09:09 -0800 (PST)
less powerful than C++ templatesNo; just different. C++ templates are essentially duck-typed; how do
you know that just because a member is called the same it has the same
purpose? Also - C++ templates are compile-time, so you can't use them
with dynamic types. C# generics are a runtime feature : as long as
your type meets the formal constraints, you can use them.
The only limitation I've ever really found with generics is the lack
of support for math operators and non-default constructors, but I've
solved both of those problems in a reusable way.
Re anon delegates - lambdas makes all this a lot friendlier.
I am a convert to the functional side of C# 3; I think it makes things
a lot easier...
Marc
.
- References:
- Delegates, Generic Methods and algorithms - Functional versus Procedural
- From: jehugaleahsa@xxxxxxxxx
- Delegates, Generic Methods and algorithms - Functional versus Procedural
- Prev by Date: Re: xmlserializer and value/reference types
- Next by Date: Re: missing code from IL
- Previous by thread: Re: Delegates, Generic Methods and algorithms - Functional versus Procedural
- Next by thread: Re: Delegates, Generic Methods and algorithms - Functional versus Procedural
- Index(es):