Article View: comp.std.c++
Article #1916Re: STL find errorprone
From: Ajay Kamdar
Date: Tue, 05 Sep 1995 16:45
Date: Tue, 05 Sep 1995 16:45
41 lines
2315 bytes
2315 bytes
In article <DED5p2.I2I@online.tmx.com.au>, Tony Cook <tony@online.tmx.com.au> wrote: >I've been using the STL a little recently and can't really call >myself an expert - but I've found that always typing in the >container's name up to three times for a find or twice for other >actions is getting a little error-prone, for example: [ Example and suggested alternative ellided ] Join the club(: You will find many who will agree that STL is error prone to use. I am sure it's a cool and efficient design, but IMHO not enough attention has been paid to make it easy to use. >One argument against this is 'the programmer can write their own' - >but this is true for most things - the libraries are there to >provide a useful (and hopefully less error-prone) implementation so >the programmer doesn't have to write their own. I couldn't agree more. Even before the ink is dry on the DWP, commercial vendors of STL implementations are already extending STL in incompatible ways to fix these STL usage problems. For example the extensions of two of the STL vendors, ObjectSpace and RogueWave, are sufficiently different from each other to prevent code written using one library to be easily ported to the other. Each approach to extending STL to make it more user friendly has merit to it and none of them is clearly the only correct way. If incompatible commercial extensions rather than STL out-of-the-box is what the programming community is going to largely use, then many of the advantages of standardizing on STL would be compromised. -- Ajay Kamdar | Email: ajay@lehman.com | Standard Disclaimer Lehman Brothers | Phone: (201) 524-5048 | --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<42hjvb$bj5@jabba.lehman.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backReferences:
<DED5p2.I2I@online.tmx.com.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back Date: 05 Sep 95 16:45:52 GMT Approved: fjh@cs.mu.oz.au From: ajay@lehman.com (Ajay Kamdar) Newsgroups: comp.std.c++ Subject: Re: STL find errorprone X-Original-Date: 5 Sep 1995 09:39:55 -0400 Organization: Lehman Brothers, Inc. Message-ID: <42hjvb$bj5@jabba.lehman.com> References: <DED5p2.I2I@online.tmx.com.au> Content-Length: 1678