🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2060

Re: Making STL user-friendly?? [Re: STL find errorprone]

#2060
From: Fabrice Clerc
Date: Wed, 27 Sep 1995 15:25
62 lines
2895 bytes
In article <4443c0$c0l@oznet03.ozemail.com.au>, maxtal@suphys.physics.su.oz.au says...
>
>martelli@cadlab.cadlab.it (Alex Martelli) wrote:
>>
>>Tony Cook <tony@online.tmx.com.au> writes:
>>       ...
>>>I don't see any need to _remove_ the current begin/end idiom - as
>>>you say it's useful - but to simply supply extra interfaces to
>>>perform the most common functions in a more compact way -
>>>specifically, operating on the whole container, and possibly
>>
>>I will agree on this one -- it IS going to be frequent, and:
>>       find(container)
>>IS a distinct enhancement over:
>>       find(container.begin(), container.end())
>
>    I DON'T agree. 
>
>    It is crucial for orthogonality that the algorithm interfaces
>are isolated from any notion of containers -- which is 
>what the STL iterator architecture is for.
[...]
>
>    There is nothing wrong with writing convenience
>functions like "find(container, value)" --- the very ability to
>do so in a few lines of code --- in several different ways ---
>is exactly why this should NOT be standardised.
>Put such a function in your own namespace, to avoid clashes.
>

so, you agree :-)

ok, suppose bob writes a small library which uses the STL.
no problem, bob's convenience functions are shipped with the
library and are placed in a namespace. tom also writes a
library which also uses the STL and also has convenience
functions in a namespace.

now, what happens if I want to build an application using both
libraries? I end up with at least two set of convenience functions
(three if I have mine) doing basically the same thing.

imho, if a lot of people end up writing the 'same' convenience
functions, these convenience functions should be placed in a
standard. the question is, what is "a lot of people" ?

>-- 
>John Max Skaller               voice: 61-2-566-2189
>81 Glebe Point Rd              fax:   61-2-660-0850
>GLEBE NSW 2037                 email: maxtal@suphys.physics.oz.au
>AUSTRALIA                      email: skaller@maxtal.com.au
>---

Fabrice Clerc
f_clerc@effix.fr
clerc@gla.ecoledoc.ibp.fr


[ 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: <9509271505.AA14733@pearl.effix.fr>
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage
From: f_clerc@effix.effix.fr (Fabrice Clerc)
Newsgroups: comp.std.c++
Subject: Re: Making STL user-friendly?? [Re: STL find errorprone]
Date: 27 Sep 1995 15:25:41 GMT
Organization: EFFIX SA, 6 rue Godefroy, BP 4, 92802 PUTEAUX CEDEX, FRANCE
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <9509271505.AA14733@pearl.effix.fr>
NNTP-Posting-Host: taumet.eng.sun.com
Content-Type: text
X-Sun-Charset: US-ASCII
Content-Length: 2082
X-Lines: 58
Originator: clamage@taumet