Utility of vectors

A

ataru

My boss has some beef or other with vectors - he says that they've given him
trouble over the years, and so he uses some template classes he wrote 15 years
ago. My question is, is the standard vector class worthy of such scorn? I
haven't talked to him in-depth about the situation, but I always thought
standard library stuff was good for just about everything...
 
K

Kevin Goodsell

My boss has some beef or other with vectors - he says that they've given him
trouble over the years, and so he uses some template classes he wrote 15 years
ago. My question is, is the standard vector class worthy of such scorn? I
haven't talked to him in-depth about the situation, but I always thought
standard library stuff was good for just about everything...

A lot has changed in 15 years. I have no idea what problem your boss has
with vectors, but I'm betting that the standard vector class is
considerably better than his templates for most purposes. The standard
library has been very carefully designed, and implementations of it are
usually done by professional library authors who know a thing or two
about writing efficient library code. They are also extensively tested,
so are likely to have fewer bugs.

The standard vector template is a very nice tool. I'd say that any
problems your boss has with it are either his problems, or problems with
some less-than-perfect implementation that's probably not used anymore.

-Kevin
 
A

Andrew Koenig

My boss has some beef or other with vectors - he says that they've
given him trouble over the years, and so he uses some template
classes he wrote 15 years ago.

Templates didn't exist 15 years ago, so your boss could not have
written template classes then.
 
D

Dave O'Hearn

My boss has some beef or other with vectors - he says that they've given
him trouble over the years, and so he uses some template classes he wrote
15 years ago. My question is, is the standard vector class worthy of
such scorn? I haven't talked to him in-depth about the situation, but I
always thought standard library stuff was good for just about everything...

If your code is already full of this proprietary vector, that would be
a good reason not to use std::vector. Mix-and-matching container
classes adds complexity, and often forces you to copy entire
containers into new ones to fit an API. If the old vector works, it is
probably good enough.

Aside from that possibility, you should consider simple NIH. The world
is full of NIH.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top