Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-04-23 04:50:37


Ivan Vecerina wrote:
> Hi,
> I wanted to give this a shot, as some others have agreed that the
> member-interface of ptree should be simplified - to being more like
> that of a container.
>
> I would plainly take out all the member functions labeled as
> "Ptree-specific operations" (see basic_ptree in the Synopsis in the
> main doc page: http://kaalus.atspace.com/ptree/doc/index.html ).
> A first step would be to convert them into a set of non-member
> functions (preferably in a separate header file).

Why do you think it is an advantage to make these functions non-members?
They still mention the property_tree in the parameter list and so are
logically still is part of the public interface of ptree.
(Thus the claim about lower coupling is somewhat overstated for a
library that rarely changes).

IFACIT, (especially normal) users prefer members. It gives them one
place to look for the interface (and is really handy in most IDE's when
"." triggers a list of functions). Or we could go back to C and make
everything a non-member.

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk