
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