On Monday, March 28, 2022 at 6:50:52 AM UTC-7, Beliavsky wrote:
(snip)
> > We have been using these PL/I facilities for 55 years.
Possibly with a 55 year old compiler.
> Robin,
> I think programming languages sometimes become so unpopular and
> unsupported that they are not viable, regardless of their intrinsic merits.
> Some say this about Fortran, but I hope they are wrong. I think it is true
> of PL/1. You have been educating us about Pl/I for years (decades?. More
> than one millennium?) Besides the Wikipedia article, what are the best
> online resources in your opinion? Maybe reading them would give
> Fortranners some ideas.
I was doing both Fortran and PL/I programming in 9th grade.
My Algebra I book actually had a PL/I chapter, but we conveniently
skipped over it. That was Fortran IV days, and I found PL/I much
more fun to program in.
There are actual stories from those designing PL/I. Among others,
and I suspect unlike many programming languages, PL/I (or NPL)
was designed before the first compiler was started.
(For those interested, there is what Knuth calls Fortran 0, that is,
the language as it was thought up before the first compiler.)
In any case, when they were first working on PL/I, they thought about
making it more compatible with (the then current) Fortran, but decided
that in the time they had (less than a year) that was not possible.
One result of designing before implementation, is that come features
turned out harder to implement than they might have thought.
(And especially considering the smaller and slower computers
of the time.) Many original PL/I features have now made it into
Fortran, close to 60 years later. It is also interesting to see the
ones that haven't.
For one, PL/I had generic intrinsic functions from the beginning,
and still more generic than Fortran. You can, for example, call
SQRT with an integer (that is, fixed point) argument. Since PL/I
allows fixed point types with the radix point other than just to the
right of the LSD, that makes sense. (In many cases, values are
converted to double precision floating point, and that is used
for the actual function call.) And yet Fortran still doesn't do that.
(PL/I will even let you call SQRT with a CHAR argument, and do
the conversion for you, if the value looks like a number.)
Sometimes it looks to me that when features are added to Fortran,
they try to make it as hard as possible for users to use them.
Complicated rules are added, so that both compiler writers
and programmers have a hard time figuring them out.
It looks to me like PL/I tends to have simpler rules, though
sometimes harder for compiler writers.
But yes, there aren't enough PL/I users to get compilers writers
interested, and not enough compilers to get users interested.