On Wed, Apr 3, 2024 at 1:30 PM segaloco via COFF <coff@tuhs.org> wrote:
I get (friendly) flack for this from some of my coworkers, context is we're a C# and Java(Type)Script shop.  They poke fun at how I write these languages like a C programmer but I don't ever hear anyone complaining about the readability of my code :)

Someone once observed that a good Fortran programmer can write Fortran in any programming language.

Here's another PL/I toxic language feature.  Both COBOL and Fortran were designed around the same time that Noam Conmsky was working out formal language theory and both have ill-behaved grammars.  Fortran has context-dependent lexical analysis, for example.  PL/I is better behaved--the grammar for its lexical analysis is a regular grammar and can be processed with a state machine.  But unlike C and other more modern languages, PL/I has no reserved keywords.  So you can write things such as:

IF IF=THEN THEN THEN = ELSE;

Here the first IF and the second THEN are keywords.  Everything else is a variable name.  Our PL/I shops forbade variable names that were the same as language keywords.

I suppose the designers of the PL/I language wanted to allow for the introduction of new language keywords while retaining backwards compatibility with programs that may have used the new keyword sa a variable name.

-Paul W.