Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: The reuse o...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 15 Topic 9542 of 9831
Post > Topic >>

Re: The reuse of keywords in the C++ standard

by marlow.andrew@[EMAIL PROTECTED] Apr 26, 2008 at 08:41 AM

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! ]
 




 15 Posts in Topic:
The reuse of keywords in the C++ standard
"Moschops" <  2008-04-24 15:14:37 
Re: The reuse of keywords in the C++ standard
red floyd <no.spam@[EM  2008-04-25 03:44:16 
Re: The reuse of keywords in the C++ standard
"Bob" <nospa  2008-04-25 03:47:59 
Re: The reuse of keywords in the C++ standard
Peter Jones <dev-null@  2008-04-25 04:13:19 
Re: The reuse of keywords in the C++ standard
"Ivan Vecerina"  2008-04-25 04:13:19 
Re: The reuse of keywords in the C++ standard
Marco Manfredini <ok_n  2008-04-25 10:14:56 
Re: The reuse of keywords in the C++ standard
Brendan <catphive@[EMA  2008-04-25 10:15:41 
Re: The reuse of keywords in the C++ standard
Alberto Ganesh Barbati &l  2008-04-25 10:49:46 
Re: The reuse of keywords in the C++ standard
"Moschops" <  2008-04-25 10:47:58 
Re: The reuse of keywords in the C++ standard
Pete Becker <pete@[EMA  2008-04-25 11:13:19 
Re: The reuse of keywords in the C++ standard
Ron Natalie <ron@[EMAI  2008-04-25 15:39:59 
Re: The reuse of keywords in the C++ standard
Andre Kaufmann <akfmne  2008-04-25 16:16:26 
Re: The reuse of keywords in the C++ standard
nickf3 <nickf3@[EMAIL   2008-04-25 16:13:19 
Re: The reuse of keywords in the C++ standard
catphive <catphive@[EM  2008-04-26 03:33:13 
Re: The reuse of keywords in the C++ standard
marlow.andrew@[EMAIL PROT  2008-04-26 08:41:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:48:11 CDT 2008.