Re: To STL or not to STL
"Ron Natalie" <ron@sensor.com > wrote in message news:<3f8f2572$ 0$182$9a6e19ea@ news.newshostin g.com>...[color=blue]
> "Samuel Barber" <opendtv@yahoo. com> wrote in message news:37991aef.0 310161457.37f35 adf@posting.goo gle.com...[color=green]
> > "Ron Natalie" <ron@sensor.com > wrote in message news:<3f8ec298$ 0$69369$9a6e19e a@news.newshost ing.com>...[color=darkred]
> > > Yes you are. If there is a feature supported by the library, you're better
> > > off using it than rolling your own. They make things much simpler. For
> > > example, vector and string both have reasonable copy/assignment/destruction
> > > behavior which means you don't have to sit there managing memory with new and
> > > delete.[/color]
> >
> > Read up on "move constructors" and you might change your opinion of
> > what is reasonable behavior.[/color]
>
> That's a different issue. I'm talking about the copying and destruction of the
> container itself (rather than the contained object).[/color]
What's so wonderful about that? Usually, programmers go to great
lengths to avoid copying containers. C++ makes it all too easy to
write elegant code which is grossly inefficient, due to implicit
copying of large objects.
Sam
"Ron Natalie" <ron@sensor.com > wrote in message news:<3f8f2572$ 0$182$9a6e19ea@ news.newshostin g.com>...[color=blue]
> "Samuel Barber" <opendtv@yahoo. com> wrote in message news:37991aef.0 310161457.37f35 adf@posting.goo gle.com...[color=green]
> > "Ron Natalie" <ron@sensor.com > wrote in message news:<3f8ec298$ 0$69369$9a6e19e a@news.newshost ing.com>...[color=darkred]
> > > Yes you are. If there is a feature supported by the library, you're better
> > > off using it than rolling your own. They make things much simpler. For
> > > example, vector and string both have reasonable copy/assignment/destruction
> > > behavior which means you don't have to sit there managing memory with new and
> > > delete.[/color]
> >
> > Read up on "move constructors" and you might change your opinion of
> > what is reasonable behavior.[/color]
>
> That's a different issue. I'm talking about the copying and destruction of the
> container itself (rather than the contained object).[/color]
What's so wonderful about that? Usually, programmers go to great
lengths to avoid copying containers. C++ makes it all too easy to
write elegant code which is grossly inefficient, due to implicit
copying of large objects.
Sam
Comment