Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-02-19 08:15:00

David Abrahams wrote:
> Douglas Paul Gregor <gregod_at_[hidden]> writes:
>> Yes, actually. Part of my weighting scheme has to do with how often
>> I need to type it. With filesystem, for instance, I either use it
>> very sparingly (and don't mind the typing), or I'm using it like mad
>> and will go with an alias no matter what. With "std", I need it all
>> the bloody time for everything, so it better be short. (Kind of like
>> "ls" or "cd").
> That's basically my philosophy. Couple that with a belief that the
> use of indcphrble abbrevs should be a conscious choice on each
> programmer's part, and not forced upon them by cruel or lazy library
> authors <wink>, and I think you can understand why I don't like
> boost::algo or boost::fs by default. If I could think of a better
> alternative I might say the same about boost::mpl.

I hate 'algo' too. :-)

But you are missing the point. Abbreviations are only introduced as
namespace (module, unit) names. A program typically uses hundreds, if not
thousands, of identifiers, but the number of namespaces/modules/units is
usually less than, say, 20. Furthermore, a namespace name is rarely used on
its own; it only provides context to a non-abbreviated identifier. And if a
long namespace name is using-directive-d away, it's arguably worse to have
no context than a two-or-three-letter abbreviated, but well known, context.

I even suspect that if you conduct a proper scientific experiment to compare
the readability of boost::filesystem::directory_iterator or
boost::regex_match against boost::fs::directory_iterator or
boost::rx::match, the results may not support your "long names are obviously
more readable" viewpoint. But that's another story. Cognitive sciences are
probably off-topic for Boost. :-)

Boost list run by bdawes at, gregod at, cpdaniel at, john at