On 25 Apr, 22:39, Ron Natalie <r...@[EMAIL PROTECTED]
> wrote:
> red floyd wrote:
>
> > Yeah, nobody used auto (it was a storage class specifier that
specified
> > automatic storage, and since local variables are automatic by default,
> > and you can't use it elsewhere, what's the point?), and so it was
> > reused, to avoid adding new keywords. If you add new keywords, you
risk
> > breaking existing code.
>
> At least they didn't overload another definition for static.
Yes, thank goodness. But I reckon a time will come when they do. IMO
the desire to avoid introducing new keywords is too great, to the
point where it is against common sense. We are lucky that in practice
auto can be safely used as if it was a new keyword (since no-one uses
it). Next time we may not be so lucky.
I understand the theory that new keywords may break existing code but
really, I think this is not a big deal, provided that the keyword is
not a very common word. I have seen more problems with third-party
headers defining macros in lowercase that are common words. These
clash wth identifiers chosen by programmers that have to use these
third-party headers on their projects. The most common case I have
seen of a keyword cla****ng is when a C header has to be used in C++
code and the C header has identifiers called 'class'. Every now and
then I still come across this. I think it is far more likely than a
class that would be caused by introducing a new keyword.
-Andrew Marlow
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|