Knowingly means knowingly; regardless of the user's sophistication or lack 
thereof; no reasonable person would expect the user to avoid unknown keywords. 
OTOH, a polite heads up would be reasonable.

However, it might be nice to have a compiler option to flag overloading of 
keywords. I wouldn't call such an option pedantic, and there might be lots of 
other legal constructs that you would want a message for.


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


________________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Paul Gilmartin <[email protected]>
Sent: Wednesday, September 2, 2020 3:17 PM
To: [email protected]
Subject: Re: A little magic from Doug Nadel

On Wed, 2 Sep 2020 18:42:19 +0000, Seymour J Metz wrote:

>> However, if IBM were to extend in that fashion it would be at the
>> cost of rendering possibly existing user code "bad form".

>No; there's a reason that I wrote "knowingly". You're describing a situation
>where the user *doesn't* know that IBM will be adding that keyword.
>
So if a naive user unwittingly uses a keyword as an identifier regardless
of chronology (there many possibilities) it's not bad form although a
more sophisticated user may perceive it so?  Or do you insist that a
competent programmer will have memorized PL/I's entire vocabulary?

It's very subjective.

Should the compiler in pedantic mode issue informative messages on
such errors in form even as GNU C compiler flags "if (A=B) ..."?

Back to FORTRAN and blanks, a colleague was aghast to learn that
blanks matter to the nascent PL/I.  But she probably didn't understand
that two blanks would be no different from one.

________________________________________
On Wed, 2 Sep 2020 15:02:51 +0000, Seymour J Metz wrote:

>PL/I has no reserved words, so IBM can extend the language without breaking 
>existing code. However, it is bad form to knowingly use a keyword as a 
>procedure, label or variable name.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to