comp.lang.ada
 help / color / mirror / Atom feed
From: Robin Vowels <robin.vowels@gmail.com>
Subject: Re: Proliferation of Reserved Words
Date: Thu, 3 Jun 2021 01:48:29 -0700 (PDT)	[thread overview]
Message-ID: <05793348-cd9c-4967-8868-07f9c5ae63f7n@googlegroups.com> (raw)
In-Reply-To: <87bl8qf2wt.fsf@nightsong.com>

On Tuesday, June 1, 2021 at 5:40:53 PM UTC+10, Paul Rubin wrote:
> "Randy Brukardt" <ra...@rrsoftware.com> writes: 
> > At least twice it was proposed that Ada have "keywords", identifiers with 
> > special meaning in the syntax but that were not reserved.
.
> I remember this as a fundamental decision of PL/I that made PL/I quite 
> hard to parse using the automata-based methods developed not long 
> afterwards. I don't know what consequences that had for PL/I or 
> anything else, if any. But I think it was retrospectively considered a 
> mistake.
.
It was definitely never considered a mistake in PL/I.
Not having reserved words means that you do not have
to steer clear of using any particular words when you
design a program.
It also means that a program will continue to compile
even when new keywords are introduced into the language.
Over the years, new keywords were introduced into PL/I,
without invalidating existing programs.
.
Reserved words are the bane of COBOL.
.
> It's a lot easier to separate parsing and scanning if you can 
> have reserved words.
> 
> OTOH I know that C compilers sometimes (usually?) handle typedefs by 
> having the parser tell the scanner to treat the typedef name as 
> keyword-like, after it sees that a typedef has been defined.

  reply	other threads:[~2021-06-03  8:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 20:51 Proliferation of Reserved Words Jeffrey R. Carter
2021-05-31 21:27 ` Dmitry A. Kazakov
2021-06-01  5:54   ` Randy Brukardt
2021-06-01  7:40     ` Paul Rubin
2021-06-03  8:48       ` Robin Vowels [this message]
2021-06-01  9:51     ` Jeffrey R. Carter
2021-06-01 16:06     ` Simon Wright
2021-06-01 11:48 ` Luke A. Guest
2021-06-02 18:13   ` AdaMagica
2021-06-02 19:21     ` Dmitry A. Kazakov
2021-06-02 20:13       ` Chris Townley
2021-06-02 20:18     ` Jeffrey R. Carter
2021-06-02 23:23     ` Bill Findlay
2021-06-03 23:58     ` Keith Thompson
2021-06-04  6:58       ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox