🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #716

Re: PL/I Grammar

#716
From: Jim Perry
Date: Wed, 18 Oct 1989 21:03
30 lines
1860 bytes
In article <1989Oct18.012237.548@esegue.segue.boston.ma.us> johnl@esegue.segue.boston.ma.us (John R. Levine) writes:
>The semantics are messy, too.  Consider:
>
>	A = B = C;
>
>which compares B and C and sets A to '1'B if they are equal.  This is no
>problem for yacc to handle, but it's a pain for humans.  What a language.

As opposed, say, to the clean semantics of something like (from C):

        if (a = b) c();

which assigns b to a and then executes the function c if b was not zero, or

        if (a == b) c;

which does nothing (assuming a & b are variables, c a function).  

One might argue that "a := b = c;" better expresses the intent of the original 
statement, unless the intent was actually "a, b = c;", which is of course 
what a PL/I programmer would have written in that case.  (A PL/I programmer
would have written the former case as "a = (b = c);").

Don't get me wrong, I don't defend PL/I as the world's greatest language, but
in a world where C is the lingua franca, I'll stick up for it.  Minor syntax
mistakes a native speaker of C might make in PL/I are much more likely to be
detected as errors than the reverse.
Jim Perry   perry@apollo.com    HP/Apollo, Chelmsford MA
This particularly rapid unintelligible patter 
isn't generally heard and if it is it doesn't matter.
Technical Details
Message-ID: <464eadaa.20b6d@apollo.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!uw-beaver!apollo!perry
References: <2956@usceast.UUCP> <1989Oct18.012237.548@esegue.segue.boston.ma.us>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!uw-beaver!apollo!perry
From: perry@apollo.HP.COM (Jim Perry)
Newsgroups: comp.lang.misc
Subject: Re: PL/I Grammar
Keywords: PL/I, C, grammar, parser
Message-ID: <464eadaa.20b6d@apollo.HP.COM>
Date: 18 Oct 89 21:03:00 GMT
References: <2956@usceast.UUCP> <1989Oct18.012237.548@esegue.segue.boston.ma.us>
Sender: root@apollo.HP.COM
Reply-To: perry@apollo.HP.COM (Jim Perry)
Organization: Hewlett-Packard Apollo Division - Chelmsford, MA
Lines: 30