Howard said:
Just curious: what's the "tr1" stand for?
"First (Library) Technical Report". Since "1tr" or "1thtr do not work
and
"firsttr" is much longer, we settled on "tr1". That it is technically
not
really the first technical report issued by the C++ committee (this was
the TR on performance) may be a little strange but it still is the
first
library TR.
Is it really going to be "tr1"?
See Section 1.3 (tr.intro.namespaces) of the current document
( said:
Having to use std:: isn't bad, but having to do std::tr1: is starting to
look like crap to me.
If the components make it into C++0x they will be moved to 'std::'.
However,
the TR does not really modify the standard and it is unclear whether
the
components will really become part of the standard and if so, whether
they
remain unchanged. Putting the names into a clearly distinguished
namespace
which is only used for that purpose allows implementers to retain the
TR
version for compatibility issues and still provide the standard version
in
the appropriate namespace.
It would have been possible to choose '::tr1' (i.e. not nest it into
namespace
'std') but this would possibly be in conflict with user namespaces:
'::tr1' is
definitely not reserved. 'std::tr1' is a safe place where a user shall
not
place his own names (if he does so, he deserves what he gets). Of
course,
'tr1' may be a macro defined by users. In this case, a user cannot use
the
'tr1' components but that's bad luck. Of course, loads of new names
which
cannot be used as macro names are introduced by the TR but since it is
conventional to at least start macro names with a capital letter, the
chances
of conflicts are actually pretty low.
I know it's nice to limit the number of characters in
an identifier (to reduce typing), but at least I try to make my id's
somewhat meaningful.
'std::tr1' *is* meaningful. It is clearly the best name available: even
dropping the '1' to make it shorter is not a reasonable choice as we
will
start working on 'tr2' ("Second (Library) Technical Report") at the
next
meeting in Lillehammer. We might get rid of the 'r', though, but I
prefer
'tr1' over 't1'.
I just hate to see my c++ code cluttered with names
that make no earthly sense!
You are free to use using directives or using declarations and only
that
part of your code uses these names. I wouldn't call that cluttering. Of
course, you are also free not to use the TR1 components at all.
Personally, I don't think the latter approach is really such a smart
move
once implementations of TR1 are widely available.