Re: programming in PL/I

glen herrmannsfeldt <>
Sun, 15 Jan 2012 01:01:17 +0000 (UTC)

          From comp.compilers

Related articles
Re: Parser generator (2012-01-08)
Re: Parser generator (glen herrmannsfeldt) (2012-01-08)
Re: Parser generator (2012-01-11)
Re: programming in PL/I (2012-01-12)
Re: programming in PL/I (Robert AH Prins) (2012-01-14)
Re: programming in PL/I (Derek M. Jones) (2012-01-14)
Re: programming in PL/I (glen herrmannsfeldt) (2012-01-15)
Re: programming in PL/I (glen herrmannsfeldt) (2012-01-15)
| List of all articles for this month |

From: glen herrmannsfeldt <>
Newsgroups: comp.compilers
Date: Sun, 15 Jan 2012 01:01:17 +0000 (UTC)
Organization: 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 <> 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.


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

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.