Related articles |
---|
[11 earlier articles] |
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) |
From: | Marco van de Voort <marcov@turtle.stack.nl> |
Newsgroups: | comp.compilers |
Date: | Mon, 19 Apr 2010 07:48:07 +0000 (UTC) |
Organization: | Stack Usenet News Service |
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:24 EDT |
On 2010-04-16, Robert A Duff <bobduff@shell01.TheWorld.com> wrote:
> "...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.
> To me, "reserved" ought to mean "you will get a compile time error if
> you use these words in certain contexts".
Yes. And so some others not, hence might. At least that is how I read it.
Note that this makes sense if they have a way to escape an identifier with
the name of a reserved word. (like e.g. Delphi has, where you can escape
such an idenitifier with &begin).
Note that this doesn't mean that it is a good idea to use
identifiers-with-the-same-name-as-reserved-words everywhere, since usually
such features are introduced only to make it easier to port old code if new
reserved words are introduced. (and e.g. Delphi's language is updated
nearly each iteration, so there it makes sense)
Return to the
comp.compilers page.
Search the
comp.compilers archives again.