Re: [boost] Filesystem: basename
At 11:32 AM 8/6/2003, David Abrahams wrote: > >I think this is a badly-chosen name. Both POSIX and Python have a >basename function which does roughly what our leaf() function does. > > ... > >I don't think we should use creative naming in cases like this one. The naming scheme based the root/branch/leaf tree metaphor was carefully worked out and reviewed over a long period of time. It would not be beneficial to use a different naming scheme for one of the decomposition function names, IMO. --Beman ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[boost] Filesystem: basename
I think this is a badly-chosen name. Both POSIX and Python have a basename function which does roughly what our leaf() function does. Python: >>> import os.path >>> help(os.path.basename) Help on function basename: basename(p) Returns the final component of a pathname >>> os.path.basename('foo/bar.baz') 'bar.baz' POSIX: $ info basename `basename': Strip directory and suffix from a file name === `basename' removes any leading directory components from NAME. Synopsis: basename NAME [SUFFIX] If SUFFIX is specified and is identical to the end of NAME, it is removed from NAME as well. `basename' prints the result on standard output. $ basename 'foo/bar.baz' bar.baz $ basename 'foo/bar.baz' .baz bar I don't think we should use creative naming in cases like this one. -- Dave Abrahams Boost Consulting www.boost-consulting.com ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost