From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-02-18 15:28:12
Douglas Paul Gregor wrote:
> On Wed, 18 Feb 2004, Peter Dimov wrote:
>> But the question is why (and the name is boost::fs). Claiming the
>> identifier 'fs' in the boost namespace isn't more evil than claiming
>> the identifier 'ref' or 'type' or 'bind'... or 'function', if you
> I'm not going to defend "type", because I'm not thrilled that it's there.
> As for the others, only "ref" is an abbreviation, but we're knocking
> something that's huge ("reference_wrapper", 17 characters) and is often
> used several times in one line of code down to 3 characters.
> I think it's a fuzzy line in the sand, so all I really know is that I do
> like "ref" and don't like "fs" :)
Yes, is seems that it comes down to personal preference. Dave likes to say
filesystem, and you don't like fs. Out of curiosity, do you like 'std'?
The reason I prefer short namespace names (and I'm very glad that the
committee decided to place the library in 'std' and not 'standard' or
'standard_library') is because I want to keep my identifiers fully
qualified, if possible. However I apparently lack the mental discipline
required to repeatedly type boost::filesystem::directory_iterator,
std::string::size_type, std::string::npos, or std::vector<X>::size_type
(much less like it :-) ).
I believe that there is a (subjective) threshold that shouldn't be crossed,
or the programmer just "goes unqualified". Now, it's well known that many
programmers don't tolerate namespaces at all. Others, apparently, are
content with longer namespace names if this aids clarity. But I somewhat
suspect that the majority are like me, they'll keep using qualified names
until the library offers them an excuse to cut corners. So I'd rather not
give them that excuse.
Just my opinion, of course. :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk