Computer Old Farts Forum
 help / color / mirror / Atom feed
From: Paul Winalski <paul.winalski@gmail.com>
To: coff@tuhs.org
Subject: [COFF] Re: Of PL/I
Date: Wed, 3 Apr 2024 16:44:30 -0400	[thread overview]
Message-ID: <CABH=_VTHTpMcODWniitM0B=ZZo4UVO2SLM+stB95hq6wcVjjVA@mail.gmail.com> (raw)
In-Reply-To: <mSPnrAvVcsHNW0uK0VN6G4delkn7bYVln9_R9N6aTaGyoPPAMNTTAz9JD7wjHoQAR-nOd0YkzSPhfJK__VkahSwrHO_xfVeiNu2TmO7cy_8=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1765 bytes --]

  reply	other threads:[~2024-04-03 20:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 15:06 [COFF] " Dave Horsfall
2024-04-02 16:40 ` [COFF] " Clem Cole
2024-04-02 17:01   ` Charles H Sauer (he/him)
2024-04-03 16:18     ` Paul Winalski
2024-04-03 17:30       ` segaloco via COFF
2024-04-03 20:44         ` Paul Winalski [this message]
2024-04-04  3:37         ` Wesley Parish
2024-04-04 15:40           ` Paul Winalski
2024-04-04 22:53           ` Peter Pentchev
2024-04-07 23:10     ` Dave Horsfall
2024-04-07 23:25       ` Charles H Sauer (he/him)
2024-04-09 21:41         ` Stuff Received
2024-04-10  0:50           ` [COFF] SNOBOL, ICEBOL, SPITBOL, et al William H. Mitchell
2024-04-10  1:42             ` [COFF] " Dave Horsfall
2024-04-08  1:13       ` [COFF] Re: Of PL/I Paul Winalski
2024-04-02 19:25   ` Stuff Received
2024-04-02 20:31     ` William H. Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABH=_VTHTpMcODWniitM0B=ZZo4UVO2SLM+stB95hq6wcVjjVA@mail.gmail.com' \
    --to=paul.winalski@gmail.com \
    --cc=coff@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).