Am 16.07.2019 um 21:22 schrieb Seymour J Metz:
Furthermore: the more modern languages like Pascal, C and Java etc.
forbid the use of reserved symbols as variable names. This may be
restrictive, but makes the compilers much much simpler.
The cardinal sin in language design is to make the compiler simpler at the 
expense of the user. An enhancement to a language with reserved word can render 
a previously valid program invalid. Contrast this with PL/I, where several 
times keywords have been added without affecting existing code.

Yes, I agree somehow to that statement ...

since I am working on my version of Stanford Pascal,
I sometimes felt the need for adding new keywords. I always had bad feelings
when doing this.

The compiler already had OTHERWISE (but no abbreviation to his, obviously),
EXTERNAL and FORTRAN.

I added BREAK, CONTINUE, RETURN, MODULE, LOCAL and STATIC;
this was in the years from 2011 to 2016. No more need since.

Don't confuse this with adding new builtin function, which is much less critical, because you always can redefine builtin functions (which are considered predefined functions at level 0) with own functions with the same name doing different things
and having different prototypes at lower levels.

IMO, new keywords are only OK, if they have a sort of well-known meaning,
inherited from other languages.

A big problem with C, IMO, is that it uses "static" for different purposes where
an additional keyword "local" (as I did it) would have been much better.

Kind regards

Bernd


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to