Re: vector of char arrays

From: Howard (alicebt_at_hotmail.com)
Date: 01/06/05


Date: Thu, 06 Jan 2005 16:35:11 GMT


"Dietmar Kuehl" <dietmar_kuehl@yahoo.com> wrote in message
news:1105028695.472173.196010@c13g2000cwb.googlegroups.com...
> Howard wrote:
>> 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
> (<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1711.pdf>).
>
>> 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.

Well, it's meaningful if you know what it means! :-)

(I was thinking along the lines of using a name like "Length" instead of "l"
in my code. And in that respect "tr1" by itself doesn't tell me much.
Something like "ext05" might tell me that it was the "2005 extension". But
no problem, I'm a big boy, and can deal with it! :-))

> 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.
> --
> <mailto:dietmar_kuehl@yahoo.com> <http://www.dietmar-kuehl.de/>
> <http://www.contendix.com> - Software Development & Consulting
>

Okee dokee. Thanks for the info, guys!
-H



Relevant Pages

  • Re: Why not add namespace feature into standard C?
    ... features, I can't understand why not add this feature into standard C. ... macro in a namespace safe way. ... And so long as you don't define a function or macro called swap, ...
    (comp.lang.c)
  • Re: shared_ptr
    ... P.J. Plauger wrote: ... to incorporate most of TR1 into the next ... We're still trying to convince Microsoft to license our ... to become a formal part of the new C++ Standard. ...
    (microsoft.public.vc.language)
  • Re: shared_ptr
    ... You can get all that stuff now by licensing our upgrade ... We're still trying to convince Microsoft to license our TR1 code sooner ... formal part of the new C++ Standard. ...
    (microsoft.public.vc.language)
  • Re: Visual C++ support of C99 by using "C++ mode" (/TP)
    ... But an interesing question is: ... the C99 library is part of C++ TR1. ... Note that the next revision of Standard ... Microsoft might be interested in adding these features. ...
    (comp.lang.c)
  • Re: shared_ptr
    ... You can get all that stuff now by licensing our upgrade ... We're still trying to convince Microsoft to license our TR1 code sooner ... formal part of the new C++ Standard. ...
    (microsoft.public.vc.language)