Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Utility of vectors

Reply
Thread Tools

Utility of vectors

 
 
ataru@nospam.cyberspace.org
Guest
Posts: n/a
 
      08-21-2003
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 |
 
Reply With Quote
 
 
 
 
Kevin Goodsell
Guest
Posts: n/a
 
      08-21-2003
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.

 
Reply With Quote
 
 
 
 
Andrew Koenig
Guest
Posts: n/a
 
      08-21-2003
> 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,
 
Reply With Quote
 
Dave O'Hearn
Guest
Posts: n/a
 
      08-22-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
c++ primer statement about vectors containing vectors pauldepstein@att.net C++ 3 03-26-2008 06:22 PM
Ruby, SWIG and C++: how to properly wrap vector of vectors of doubles (2D vectors)? Ruby 0 09-14-2005 05:47 PM
Conditional Check on Vectors Analog Guy VHDL 3 10-07-2004 09:13 AM
millions combinations of test vectors for ALU Lily VHDL 16 05-10-2004 07:22 PM
Comparison of Bit Vectors in a Conditional Signal Assignment Statement Anand P Paralkar VHDL 2 08-04-2003 08:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57