Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 31,900 of 33,346    |
|    Richard Smith to All    |
|    Politics of using the standard library    |
|    10 Feb 12 14:29:50    |
      From: richard@ex-parrot.com              I'm doing some coding in my spare time on an open source C++ project       which I won't name the project to avoid any embarrassment. The code       base is about 250k lines long. Much of the code is quite object       oriented in nature, though not excessively so. Exceptions are used only       very rarely, which is just as well as much of the code is not exception       safe. (Certainly no RAII here!) Templates are used a bit, but not       heavily. Other than a GUI library there are no third party libraries in       use. All in all, I'd describe the code as pretty reasonable, though of       a rather dated style.              Recently I've been pushing to modernise the code in a bit. Nothing       radical. Let's start using a scoped_ptr class to avoid having to       carefully delete pointers at every function return. Let's get rid of       our own buggy vector and list implementation and use std::vector       instead. Why do we need our own sort algorithm which is no better than       std::sort? And so on.              But I'm getting nowhere. "The STL is inefficient", I'm told. "It's       buggy or missing on many of the architectures we support." "Why change?        We're fine with what we've got." And so on. I've failed to       demonstrate that std::vector is faster than our internal one.       Unfortunately my profiling uniformly suggests std::vector is 10% slower,       which may or may not be representative or even relevant, but certainly       isn't helping my case. Even when today I discovered a double       destruction bug in our vector that had clearly been present for many       years, and have now found similar bugs in many of our other STL-like       templates, I'm still failing to get others to believe that our STL-like       templates are more, not less, buggy than the standard library.              What I'd really like is something, preferably on-line, that I can point       the other developers at that demonstrates that (i) the standard library       does work. Really. And (ii) it's fast enough. Or, for that matter,       any other ideas on how to get the other developers on side.              --       Richard Smith                      [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca