By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,194 Members | 811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,194 IT Pros & Developers. It's quick & easy.

Utility of vectors

P: n/a
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...

--
Christopher Benson-Manica | Jumonji giri, for honour.
ataru(at)cyberspace.org |
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
> 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.

--
Andrew Koenig, ar*@acm.org
Jul 19 '05 #2

P: n/a
at***@nospam.cyberspace.org wrote:
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
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Jul 19 '05 #3

P: n/a
at***@nospam.cyberspace.org wrote:
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.

--
Dave O'Hearn
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.