Re: language twiddling, was Infinite look ahead required by C++?

Gene Wirchenko <genew@ocis.net>
Sun, 18 Apr 2010 19:20:05 -0700

          From comp.compilers

Related articles
[10 earlier articles]
Re: language twiddling, was Infinite look ahead required by C++? bartc@freeuk.com (bartc) (2010-03-08)
Re: language twiddling, was Infinite look ahead required by C++? cfc@shell01.TheWorld.com (Chris F Clark) (2010-03-10)
Re: language twiddling, was Infinite look ahead required by C++? bobduff@shell01.TheWorld.com (Robert A Duff) (2010-03-12)
Re: language twiddling, was Infinite look ahead required by C++? nevillednz@gmail.com (Neville Dempsey) (2010-03-14)
Re: language twiddling, was Infinite look ahead required by C++? genew@ocis.net (Gene Wirchenko) (2010-04-14)
Re: language twiddling, was Infinite look ahead required by C++? bobduff@shell01.TheWorld.com (Robert A Duff) (2010-04-16)
Re: language twiddling, was Infinite look ahead required by C++? genew@ocis.net (Gene Wirchenko) (2010-04-18)
Re: language twiddling, was Infinite look ahead required by C++? marcov@turtle.stack.nl (Marco van de Voort) (2010-04-19)
| List of all articles for this month |

From: Gene Wirchenko <genew@ocis.net>
Newsgroups: comp.compilers
Date: Sun, 18 Apr 2010 19:20:05 -0700
Organization: Compilers Central
References: 10-02-024 10-02-039 10-02-086 10-02-088 10-03-003 10-03-005 10-03-007 10-03-012 10-04-039 10-04-041
Keywords: design, syntax
Posted-Date: 20 Apr 2010 19:09:12 EDT

On Fri, 16 Apr 2010 10:22:14 -0400, Robert A Duff
<bobduff@shell01.TheWorld.com> wrote:


[snip]


>Wow! I've never used Visual FoxPro, but I found this via google:
>
>http://msdn.microsoft.com/en-us/library/xztfc506(VS.80).aspx
>
>which says:
>
> "...When programming, avoid using reserved words as names for window,
> table, or field names. If you use a reserved word as a name, it
> might generate a syntax error."
>
>"might"?! That's amazingly poor language design, unless there's some
>documentation elsewhere that defines when they really are reserved.


          Not that I am aware of. It does seem to be that the reserved
meaning takes precedence in that particular context, but otherwise,
the word can be used as a variable, etc. name.


          I got bit on this once when I called a column "status". One time
in debugging, I typed
                    display status
which would have displayed the status column if status were not a
reseved word. I got something else.


>To me, "reserved" ought to mean "you will get a compile time error if
>you use these words in certain contexts".
>
>It then goes on to list approximately 2500 "reserved words". So
>programmers are expected to memorize thousands of words, and avoid
>their use with little help from the compiler. That's just nuts!


          Just? What about silly?


Sincerely,


Gene Wirchenko



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.