Re: programming in PL/I

glen herrmannsfeldt <gah@ugcs.caltech.edu>
Sun, 15 Jan 2012 01:01:17 +0000 (UTC)

          From comp.compilers

Related articles
Re: Parser generator drb@msu.edu (2012-01-08)
Re: Parser generator gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-01-08)
Re: Parser generator arnold@skeeve.com (2012-01-11)
Re: programming in PL/I compilers@is-not-my.name (2012-01-12)
Re: programming in PL/I robert@prino.org (Robert AH Prins) (2012-01-14)
Re: programming in PL/I derek@_NOSPAM_knosof.co.uk (Derek M. Jones) (2012-01-14)
Re: programming in PL/I gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-01-15)
Re: programming in PL/I gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-01-15)
| List of all articles for this month |
From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: Sun, 15 Jan 2012 01:01:17 +0000 (UTC)
Organization: Aioe.org NNTP Server
References: 12-01-009 12-01-010 12-01-013 12-01-017 12-01-020
Keywords: PL/I, comment
Posted-Date: 14 Jan 2012 23:31:58 EST

Derek M. Jones <derek@_nospam_knosof.co.uk> wrote:


(snip, someone previously wrote)


>>> Is there a reason to prefer PL/I over C++ or Java?


(snip, someone else wrote)
>> PL/I is more powerful than C,


> Since both are Turing complete languages how is PL/1 more powerful?


It seems to me that there are at least to ways to consider a language
powerful. One is that it lets you do many different things, the other
is that it allows them to be expressed easily.


This has at least some connection to compilers, so maybe not too
far off topic.


One PL/I feature that C doesn't have is array and structure expressions.


You can write:


      A = B + C;


for arrays or structures (or arrays of structures) in PL/I, but you
need loops, possibly nested loops, in C. (For structures, usually many
statements, as it isn't so easy to loop over a structure.)


Fortran now has array expressions, but still not structure expressions.


> Probably the major reason why people promote the benefits of any language.


(snip)


> [This is getting a bit far from compiler design. PL/I suffers and
> benefits from being a kitchen sink language. Cobol-style pictures
> are really handy if you're doing formatted numeric I/O, just
> strange otherwise. -John]


I do hope that sometimes language feature discussions, related to the
ability, or lack thereof, to implement them in a compiler would be on
topic.


I do remember Picture format and Picture variables, though maybe I
never tried them. I liked the idea of picture format, but thought that
picture variables were strange. I even remember that there were
Picture format options for British Pounds/Shillings/Pence, though
maybe not in newer compilers.


-- glen
[Those came straight from Cobol. For what they're intended for, printing tidy
columns of numbers in reports, they work very well. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.