Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2004-09-05 08:29:00

Jonathan Wakely wrote:

> On Fri, Sep 03, 2004 at 10:16:39AM +0200, Thorsten Ottosen wrote:
>>Dear all,
>>John Torjo asks why don't rename the Range concepts empty() function to the more idiomatic and less embarrassing
>>name is_empty()?
>>My initial thoughts were if this could ceate more confusion, but I'm beginning to think John is right.
>>So if people would cast some yes or no votes it would be great.
> Hmm ... the function takes its argument by const-reference, so it's
> "obvious" it doesn't empty the range if you've seen the function
> declaration. (But anything "obvious" will fail to be obvious to
> some people).
> Although it would be nice if the STL had used is_empty() it's too late
> to change that now, and Boost's web site does say:
> The emphasis is on libraries which work well with the C++ Standard
> Library.

And how would range lib not work well with STL from this point of view?

> I think consistency with the existing name is important.

I'm all for consistency myself, but keeping up a bad standard, while
many experts say the name is wrong, is just perpetuating bad practice.


John Torjo
-- john_at_[hidden]
Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
-- v1.3beta released - check out splitter/simple_viewer,
    a File Explorer/Viewer all in about 200 lines of code!
Professional Logging Solution for FREE
-- (logging           - C++)
--         (viewing/filtering - Win32)
--        (debugging         - Win32)

Boost list run by bdawes at, gregod at, cpdaniel at, john at