Boost logo

Boost :

From: Darren Cook (darren_at_[hidden])
Date: 2004-02-19 18:49:04

> What would be wrong about having both _as standard_?
> namespace boost::filesystem {
> // ...
> }
> namespace boost::fs = boost::filesystem;
> This would have some big advantages:
> -) The user can choice between using the long or the short name
> (abbreviation)
> -) boost::fs clearly shows the origin of the type (boost).
> -) The abbreviaton is standardized and can so be used consistently in
> both the documentation and the code.

I think this last point is important.

I'm okay with writing std::cout or std::for_each. It only adds 5 chars which
isn't enough to disturb me. If the standard library had instead been
namespace "standard" I'd probably always write "using namespace standard" at
the top of all my programs.

I don't like use of renaming namespaces in client code - it is something
that a programmer has to hunt through code (possibly in another header file)
to found out what it refers to. But having the library define the short form
as proposed above makes sense.


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