Boost logo

Boost :

From: Bjørn Roald (bjorn_at_[hidden])
Date: 2008-07-03 18:36:02


Beman Dawes wrote:
> David Abrahams wrote:
>
>> So one other option that avoids the above issues (not that I'm pushing
>> this route) is to pick another name for what you currently call leaf().
>
> Let's say branch_path() is changed to parent_path(). That suggests a
> full set of names based on the parent/child decomposition of a path:
>
> * Change branch() to parent_path()
> * Change leaf() to child()
> * Change basename() to child_prefix()
> * Change extension() to child_extension()
>
> At first glance, those names seem reasonable clear and self-consistent.
>
> What's your take on that set?

I am not sure this is any good. Considder the path "../../a/b" and the
meaning of parent and child.

The only sensible parent is in the middle and we don't even know it's
name. Children are at both ends the implicit "." or "b".
 

-- 
Bjørn

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