Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-05-30 18:49:02


on Thu May 29 2008, Beman Dawes <bdawes-AT-acm.org> wrote:

> Beman Dawes wrote:
>>...An
>> alternative set I'd be comfortable with would be tail() for the current
>> leaf() and head_path() for the current branch_path().
>
> Hum... After sending that, I read Johan RÃ¥de's "parent" suggestion.
>
> I really like parent_path() for the current branch_path().
>
> That leaves leaf(). tail() is arguably slightly better, but not by a
> lot. Other possibilities:
>
> leaf() // cryptic
> tail() // slightly better
> right() // cryptic
> rightmost() // better
> rightmost_name() // very explicit, but longish

Actually, "name()" would be just fine. Just ask yourself, "what is the
name of this file/directory?" without thinking too hard about it and the
answer is always what is currently called "leaf()." I don't believe
names need to be chosen such that they shield the user from overthinking
things :-)

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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