> A somewhat complementary sin is to enrich the facilities of the language
> to the benefit of the sophisticated user but to the detriment of the naive
> user.

If by "enrich" you mean to change the semantics of existing code, then that is 
not to the benefit of the sophisticated user. Enhancements to the language 
should be transparent to those not using them.


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

________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Tuesday, July 16, 2019 4:16 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Where put the notional constant in a condition (Was RE: JCL COND 
Parameter)

On Tue, 16 Jul 2019 21:37:38 +0200, Bernd Oppolzer wrote:

>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 ...
>
A somewhat complementary sin is to enrich the facilities of the language
to the benefit of the sophisticated user but to the detriment of the naive
user.

I'll add near-ambiguities such as assignment vs. comparison and tricky
semantics of semicolon.  A co-worker once tried removing ";" from the
definition of Pascal and running a meta-parser on the BNF.  The only
further change he needed to make the syntax valid at the same Chomsky
level was to remove the null statement from the language definition.

>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.
>
I've done many of these as predefined quasi-identifiers, similar to Pascal's
predefined standard types.  A programmer could choose to declare CONTINUE
as an identifier, overriding its predefined meaning within the block containing
the declaration.

I've heard partisans rail that the standard types can be overridden by
local declarations.  If it bothers them, they shouldn't do it.  But I've seen:
    TYPE -32768 .. 32767 INTEGER;
to force 16-bit behavior on machines with other word sizes.  I'm
uncomfortable with that.

-- gil

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

----------------------------------------------------------------------
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