|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-04-28 13:41:42
I'll post a full update on all standard library TR proposals soon, but
because there is a lot of smart pointer discussion in progress, the smart
pointer proposal is of particular interest.
It is also the only Boost originated proposal for which the Library Working
Group is expressing serious concern over technical issues.
If anyone who was present has additions or corrections, please let me know
offline.
--Beman
--- smart pointer proposal status ---
[Curaçao: The LWG expressed serious concerns about the proposal, and about
other smart pointer issues:
* Because user needs are so varied, Standard Library smart pointers should
support a full feature model, including user supplied behavior. A
policy-based design is seen as the only candidate likely to meet this
criteria.
* Because of the need for a single smart pointer to recommend for everyday
use, and for interoperability between third-party libraries, shared_ptr is
seen as a likely candidate for standardization. The LWG is interested
primarily in the interface and with interoperability, although aware that
implementation might well be forwarded to a policy-based smart pointer.
* Standard Library smart pointers should be viewed as a whole to ensure
consistency and interoperability; thus the idea of unrelated proposals for
non-policy based and policy-based smart pointers meets much resistance.
* Proliferation of Standard Library smart pointers is a serious concern; if
a policy-based smart pointer and a compatible shared_ptr were available,
they would be preferred; scoped_ptr, scoped_array, and shared_array were
not viewed favorably by many LWG members.
* LWG members are very concerned that "you don't have to pay for what you
don't use." This is particularly true of memory; increased memory use due
to multiple inheritance or to accommodate weak_ptr, for example, is viewed
as a serious problem.
* LWG members are concerned about usability and flexibility of designs with
multiple template policy parameters. A single policy parameter, with
policy composition by chained inheritance, would seem to have usability,
flexibility, and inter-policy communication advantages.
* In a quick (no discussion of exact meaning of terms) straw poll, the vote
was 9 1/2 yes, 0 no, to the question of whether or not a policy-based smart
pointer should support arrays. (The 1/2 vote was from someone undecided.)
* There was a bit of discussion and show of hands on non-member versus
member functions. No clear guidance resulted; the existing use of member
functions in std::auto_ptr and the Boost smart pointers muddied the
question.
Note that the LWG is still considers many of these concerns as subject to
change, as proposals are refined.]
--- end ---
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk