Re: [Boost-bugs] [Boost C++ Libraries] #5929: empty(), data(), size()

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5929: empty(), data(), size()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-23 11:16:18


#5929: empty(), data(), size()
-----------------------------------+----------------------------------------
  Reporter: olafvdspek@… | Owner: daniel_frey
      Type: Feature Requests | Status: closed
 Milestone: To Be Determined | Component: operators
   Version: Boost 1.47.0 | Severity: Problem
Resolution: wontfix | Keywords:
-----------------------------------+----------------------------------------
Changes (by daniel_frey):

  * status: new => closed
  * resolution: => wontfix

Comment:

 There are several issues here:

 a) Domain - Currlenty, operators are arithmetic operators or iterator
 support. In your case, they are now container support (and not even real
 operators). I would like to restrict the operators library to what it is,
 I even think about splitting it into two libraries from time to time.
 Adding more operators (or operator-like functions) does not seem like a
 good idea.

 b) Naming - How would you call the new base classes? emptyable? data-able?
 I don't see any obvious names for them.

 c) Efficiency - If end() is O(n), so are empty(), data() and size(),
 although O(1) might be possible. Are we sure users get that or that it is
 unlikely enough to not be a problem?

 d) Convenience - The (IMHO) real power of the operators library is, that
 there are groups of operators and **that** saves you from typing the same
 code over and over again. Plus that we ensure exploiting optimizations
 (RVO/NRVO) that some people might otherwise miss. For your case, there
 doesn't seem to be much gained by replacing the proposed functions by a
 base class each.

 I am thus closing this ticket as "wontfix", if you disagree, feel free to
 reopen it or discuss it on the mailing list.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5929#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC