Re: C# generic containers from a "C++ perspective"
- From: "Giovanni Dicanio" <giovanni.dicanio@xxxxxxxxxxx>
- Date: Fri, 21 Mar 2008 18:34:10 +0100
"Jon Harrop" <usenet@xxxxxxxxxxxxxx> ha scritto nel messaggio
news:13u7nqbca41f80@xxxxxxxxxxxxxxxxxxxxx
Giovanni Dicanio wrote:
i.e. the C# version:
List< double >
is equivalent to C++ :
vector< double >
or instead:
vector< double * >
The former. This is one of the things that C++ screwed up and is fixed in
C#, making it much nicer to program in.
I agree with you.
And that is not the only thing done better in C# than in C++ (other things
include better string management and built-in support for Unicode strings,
reflection, etc.)
However, there are also some things that IMHO are better in C++ than C#,
like RAII and deterministic destruction.
(The garbage collector is good for memory resources, but there are also
*non*-memory resources, like files, sockets, textures... for them garbage
collector is useless, and RAII and deterministic destruction are better.)
Giovanni
.
- References:
- C# generic containers from a "C++ perspective"
- From: Giovanni Dicanio
- Re: C# generic containers from a "C++ perspective"
- From: Jon Harrop
- C# generic containers from a "C++ perspective"
- Prev by Date: Re: C# 3.0 property setter question!
- Next by Date: Re: C# generic containers from a "C++ perspective"
- Previous by thread: Re: C# generic containers from a "C++ perspective"
- Next by thread: Re: C# generic containers from a "C++ perspective"
- Index(es):
Relevant Pages
|