Utility of vectors

Discussion in 'C++' started by ataru@nospam.cyberspace.org, Aug 21, 2003.

  1. Guest

    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 |
     
    , Aug 21, 2003
    #1
    1. Advertising

  2. 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.
     
    Kevin Goodsell, Aug 21, 2003
    #2
    1. Advertising

  3. > 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,
     
    Andrew Koenig, Aug 21, 2003
    #3
  4. Dave O'Hearn Guest

    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
     
    Dave O'Hearn, Aug 22, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. james

    VB.NET Class Builder Utility 1.0

    james, Apr 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,000
    james
    Apr 7, 2004
  2. Ed Anuff
    Replies:
    0
    Views:
    2,103
    Ed Anuff
    Feb 8, 2004
  3. Victor Hannak
    Replies:
    0
    Views:
    7,521
    Victor Hannak
    Feb 20, 2004
  4. Replies:
    3
    Views:
    725
    Shadowman
    Mar 26, 2008
  5. Guest
    Replies:
    0
    Views:
    481
    Guest
    Sep 14, 2005
Loading...

Share This Page