Syntactic restrictions:
Only one label prefix with only one subscript
Condition prefixes on procedure and begin statements
End statements close only one group or block
No comma-lists in do statements
Assignment statements must have only one target
Get and put statements: one I/O list, zero or one format list
No third value for E and F format items
Into and from options on record I/O statements must not be unaligned
No dimensioned file constants
Unaligned types must be strings
Pictures must not be aligned
Static variables must not be initialized to constant labels, entries, or files
Automatic initializer for a dimensioned variable must have * iteration
No negative scale factors
Non-zero scale factors for FIXED DECIMAL only
No format constants except labels on format statements
Max and min: only two arguments
Pseudo-variables only on the left side of assignment statements
All precision, scale, or number-of-digits arguments must be
integers or defined constants
Semantic restrictions:
All functions yield scalar values
Do control variable must be arithmetic or pointer
If, while, or until expression must be bit string of length 1
Unconnected arrays cannot be passed as arguments
No return statements within on statements
All names must be declared except SYSIN, SYSOUT, and labels
All parameters and return types must be specified
All overlays must have identical type and extents, or be strings
Refer, if present, must appear at the end of a structure
Subscripts and extents must be integers
No conversions between arithmetic/pictured values and string values
No conversions between bit strings and character strings
No conversions between pointers and offsets except via addr function Aggregate assignment must be between connected storage
of the same type
Excluded features:
default statement, entry statement,
binary constants, replicated string constants
conditions: name, stringrange, stringsize, subscriptrange
assignment by name.
locate statement
open keyword: tab
get/put keyword: data
get keyword: copy.
read keyword: ignore
c format item
attributes: complex, controlled, generic, like, local, position
picture characters: a, e, i, k, r, t, x, y.
bit varying
iSUB defining
format variables
Syntactic restrictions:
default statement, entry statement
Can't write a generic function? Ridiculous!
On Sunday, September 11, 2022 at 8:27:55 PM UTC-4, Robin Vowels wrote:
conditions: name, stringrange, stringsize, subscriptrange
Again, the committee had no idea what it was doing to exclude these.
SUBSTR is essential in any program using arrays.
STRINGSIZE and STRINGRANGE are essential for the same reason
in string-handling.
Appendix D, which my post is a precis of, excludes them as "debugging conditions", which are useful in testing code that may be buggy, but not useful in production code.
Their omissions would take us back to the says of FORTRAN IV,
when stepping past the bounds of an array went undetected
and difficult to find.
Not at all. It is one thing to detect an error, another to provide a way
to intercept the error and take corrective action, which is why you need
a CONDITION. Compilers have two possibilities in the absence of these conditions: one is to raise an ERROR condition with a suitable ONCODE,
and another is to log the error and have the program fail. A third is
to let the program dance the fandango on core, but that is certainly not a requirement.
(That said, I have never been happy with the idea of having such tests in debug mode but removing them from production code: I think it was Fred
Brooks who said it was like carrying lifeboats while you were tooling
around the harbor and leaving them behind when you headed out to sea.)
get/put keyword: data
Obviously the Committee had no idea what the facility was used for.
The Committee's job was not to remove useless features: every feature is useful to some programmer for writing some program, and generally more
than one of each, or it wouldn't have been included. Their job was to
remove features that, in their expert judgement, cost more (implicitly:
under the conditions of programming 35 years ago) than the benefits they provided to the PL/I community as a whole. I assume the cost in question
was runtime memory, something that isn't nearly as expensive as it was then.
Note also that the motivation for the 1987 revision of Subset G, which is what I'm working from, was primarily to add back features omitted from
the original 1981 version that made the language excessively spare.
Perhaps a later revision, if there had been one, would have added back GET/PUT DATA as memory restrictions loosened over time. That no such revision ever happened is beyond anyone's control today.
attributes: complex, controlled, generic, like, local, position.
Omitting COMPLEX and CONTROLLED would produce a mickey-mouse
language of little practical value.
To say that is to ignore the history of the last 45 years, my entire
career in the trenches as a professional programmer, during which time I
have used many, many languages and never needed either feature.
Scientific programming is a niche, and in a relative sense is a smaller
niche than ever. See above concerning costs and benefits. As for
private stack allocation, which is what makes CONTROLLED unique, AREA
seems to me to subsume much of that. (If this is not so, or anything
else I say is wrong, please let me know.)
That said, I certainly do not scorn complex numbers, even if they
represent half the arithmetic types of PL/I, which is why I proposed
adding back COMPLEX FLOAT, far and away the typical use case.
conditions: name, stringrange, stringsize, subscriptrange
Again, the committee had no idea what it was doing to exclude these.
SUBSTR is essential in any program using arrays.
STRINGSIZE and STRINGRANGE are essential for the same reason
in string-handling.
Their omissions would take us back to the says of FORTRAN IV,
when stepping past the bounds of an array went undetected
and difficult to find.
get/put keyword: data
Obviously the Committee had no idea what the facility was used for.
attributes: complex, controlled, generic, like, local, position.
Omitting COMPLEX and CONTROLLED would produce a mickey-mouse
language of little practical value.
iSUB defining.
There are specific uses for iSUB that simplify programming.
One is to define an array that omits all the border elements.
Syntactic restrictions:
No dimensioned file constants
No format constants except labels on format statements
Pseudo-variables only on the left side of assignment statements
Semantic restrictions:
No conversions between arithmetic/pictured values and string values
No conversions between bit strings and character strings
Excluded features:
format variables
First, I’d like to say that I’m happy to see this discussion about the language. It’s like a breath of fredh air.
GET/PUT DATA without a data list is a nightmare.
Robin has a scientific programming bias, so I can see where he’d need COMPLEX. I’m still playing around with re-compiling IBM’s Scientific Subroutine Package, and I’m adding the features it uses - COMPLEX and iSub being the two major ones remaining. I now have all the math builtins done.
adding back COMPLEX FLOAT, far and away the typical use case.
Robin has a scientific programming bias, so I can see where he’d need COMPLEX. I’m still playing around with re-compiling IBM’s Scientific Subroutine Package, and I’m adding the features it uses - COMPLEX and iSub being the two major ones remaining. I now have all the math builtins done..
On Sunday, September 11, 2022 at 8:27:55 PM UTC-4, Robin Vowels wrote:.
conditions: name, stringrange, stringsize, subscriptrange
Again, the committee had no idea what it was doing to exclude these. SUBSTR is essential in any program using arrays.Appendix D, which my post is a precis of, excludes them as "debugging conditions", which are useful in testing code that may be buggy, but not useful in production code.
STRINGSIZE and STRINGRANGE are essential for the same reason
in string-handling.
.Their omissions would take us back to the says of FORTRAN IV,
when stepping past the bounds of an array went undetected
and difficult to find.
Not at all..
It is one thing to detect an error, another to provide a way to intercept the error and take corrective action, which is why you need a CONDITION. Compilers have two possibilities in the absence of these conditions:.
one is to raise an ERROR condition with a suitable ONCODE, and another is to log the error and have the program fail. A third is to let the program dance the fandango on core, but that is certainly not a requirement.behind when you headed out to sea.)
(That said, I have never been happy with the idea of having such tests in debug mode but removing them from production code: I think it was Fred Brooks who said it was like carrying lifeboats while you were tooling around the harbor and leaving them
judgement, cost more (implicitly: under the conditions of programming 35 years ago)The Committee's job was not to remove useless features: every feature is useful to some programmer for writing some program, and generally more than one of each, or it wouldn't have been included. Their job was to remove features that, in their expertget/put keyword: dataObviously the Committee had no idea what the facility was used for.
than the benefits they provided to the PL/I community as a whole. I assume the cost in question was runtime memory, something that isn't nearly as expensive as it was then.been one, would have added back GET/PUT DATA as memory restrictions loosened over time. That no such revision ever happened is beyond anyone's control today.
Note also that the motivation for the 1987 revision of Subset G, which is what I'm working from, was primarily to add back features omitted from the original 1981 version that made the language excessively spare. Perhaps a later revision, if there had
.attributes: complex, controlled, generic, like, local, position.
Omitting COMPLEX and CONTROLLED would produce a mickey-mouse
language of little practical value.
To say that is to ignore the history of the last 45 years, my entire career in the trenches as a professional programmer, during which time I have used many, many languages and never needed either feature..
Scientific programming is a niche, and in a relative sense is a smaller niche than ever. See above concerning costs and benefits. As for private stack allocation, which is what makes CONTROLLED unique, AREA seems to me to subsume much of that. (If thisis not so, or anything else I say is wrong, please let me know.)
That said, I certainly do not scorn complex numbers, even if they represent half the arithmetic types of PL/I, which is why I proposed adding back COMPLEX FLOAT, far and away the typical use case.
See above re: tradeoffs. I may have added this to my list with the restriction that it must specify a contiguous portion of the base array.iSUB defining.
There are specific uses for iSUB that simplify programming.
One is to define an array that omits all the border elements.
On Sunday, September 11, 2022 at 6:14:19 PM UTC-4, co...@ccil.org wrote:.
.Pseudo-variables only on the left side of assignment statements
So no "substr" on the right? Seems I don't get it.
John Cowan <co...@ccil.org> wrote:.
First, I’d like to say that I’m happy to see this discussion about the language. It’s like a breath of fredh air.
On Sunday, September 11, 2022 at 8:27:55 PM UTC-4, Robin Vowels wrote:
conditions: name, stringrange, stringsize, subscriptrange
Again, the committee had no idea what it was doing to exclude these.
SUBSTR is essential in any program using arrays.
STRINGSIZE and STRINGRANGE are essential for the same reason
in string-handling.
Appendix D, which my post is a precis of, excludes them as "debugging conditions", which are useful in testing code that may be buggy, but not useful in production code.
IMNSHO, as a long-time PL/I programmer, STRINGSIZE is completely useless..
On Monday, September 12, 2022 at 10:57:05 AM UTC-4, bearlyabus...@gmail.com wrote:
First, I’d like to say that I’m happy to see this discussion about the >> language. It’s like a breath of fredh air.
Thank you for saying so. I had feared that I was going to get nothing
but scorn from making all these "impractical" and "useless" proposals.
GET/PUT DATA without a data list is a nightmare.
I agree. What is worse, GET DATA without a list allows malicious input
to corrupt the program's global state, which is a disaster. I've
tentatively added GET DATA with an explicit list and PUT DATA to my extensions list, but I may remove them again.
Robin has a scientific programming bias, so I can see where he’d need
COMPLEX. I’m still playing around with re-compiling IBM’s Scientific
Subroutine Package, and I’m adding the features it uses - COMPLEX and iSub >> being the two major ones remaining. I now have all the math builtins done.
Excellent! I'd like to see a list of what you needed to add already, if that's easy to do.
adding back COMPLEX FLOAT, far and away the typical use case.
I actually mean "only COMPLEX BIN FLOAT", by the way. One of the
criteria for me to add an item to my extensions list is that it will be
easy to implement in pli2c; gcc comes with a complex.h header file (standardized by C99, but made optional in C11).
On Sunday, September 11, 2022 at 6:14:19 PM UTC-4, co...@ccil.org wrote:
Syntactic restrictions:
No dimensioned file constants
What is a "dimensioned file constant"?
No format constants except labels on format statements
What is the disallowed "format constant"? Never heard of that.
Pseudo-variables only on the left side of assignment statements
So no "substr" on the right? Seems I don't get it.
Semantic restrictions:
No conversions between arithmetic/pictured values and string values
No conversions between bit strings and character strings
Why? Those aren't even hard to do.
Excluded features:
format variables
What is a "format variable"?
On Tuesday, September 13, 2022 at 12:57:05 AM UTC+10, bearlyabus...@gmail.com wrote:
John Cowan <co...@ccil.org> wrote:.
First, I’d like to say that I’m happy to see this discussion about the >> language. It’s like a breath of fredh air.
On Sunday, September 11, 2022 at 8:27:55 PM UTC-4, Robin Vowels wrote:
conditions: name, stringrange, stringsize, subscriptrange
Again, the committee had no idea what it was doing to exclude these.
SUBSTR is essential in any program using arrays.
STRINGSIZE and STRINGRANGE are essential for the same reason
in string-handling.
Appendix D, which my post is a precis of, excludes them as "debugging
conditions", which are useful in testing code that may be buggy, but not >>> useful in production code.
IMNSHO, as a long-time PL/I programmer, STRINGSIZE is completely useless..
Maybe you never did this:
.
IBM: "If STRINGSIZE is disabled, and the length of the source and/or
the target is determined at run time, and the target s too short to
contain the source, unpredictable results can occur."
On Sunday, September 11, 2022 at 8:27:55 PM UTC-4, Robin Vowels wrote:.
.See above re: tradeoffs. I may have added this to my list with the restriction that it must specify a contiguous portion of the base array.iSUB defining.
There are specific uses for iSUB that simplify programming.
One is to define an array that omits all the border elements.
Robin Vowels <robin....@gmail.com> wrote:.
On Tuesday, September 13, 2022 at 12:57:05 AM UTC+10, bearlyabus...@gmail.com wrote:
John Cowan <co...@ccil.org> wrote:.
First, I’d like to say that I’m happy to see this discussion about the
language. It’s like a breath of fredh air.
On Sunday, September 11, 2022 at 8:27:55 PM UTC-4, Robin Vowels wrote: >>>
conditions: name, stringrange, stringsize, subscriptrange
Again, the committee had no idea what it was doing to exclude these. >>>> SUBSTR is essential in any program using arrays.
STRINGSIZE and STRINGRANGE are essential for the same reason
in string-handling.
Appendix D, which my post is a precis of, excludes them as "debugging >>> conditions", which are useful in testing code that may be buggy, but not >>> useful in production code.
IMNSHO, as a long-time PL/I programmer, STRINGSIZE is completely useless..
Maybe you never did this:
.
IBM: "If STRINGSIZE is disabled, and the length of the source and/or
the target is determined at run time, and the target s too short to contain the source, unpredictable results can occur."
I do this all the time, and every implementation I’ve seen just truncates on assignment, as you’d expect (and as COBOL does). To do anything else would be absolute madness.
John Cowan <co...@ccil.org> wrote:.
Syntactic restrictions:
default statement, entry statement
ENTRY statement is a misfeature anyway. Packages, introduced in subset G, IIRC, are a much better way to achieve the same result.
There’s no way statically to relate an ENTRY statement to a RETURN, so all RETURNS must be able to return any of the possible data types.
Robin Vowels <robin....@gmail.com> wrote:.
Can't write a generic function? Ridiculous!Your milage may vary, but I never found GENERIC to be of any use. It struck me as a half-hearted attempt at object-oriented programming, but basically it’s a form of macro.
It is one thing to detect an error, another to provide a way to intercept the error and take corrective action, which is why you need a CONDITION. Compilers have two possibilities in the absence of these conditions:.
Rubbish.
Without the means of detecting such an error, there can be no error message nor any warning that an error occurred.
Which happened regularly in the days of FORTRAN. Programs just crashed.
PL/I was introduced in 1966; that's 55 years ago, not 35, when memory
was adequate to run PL/I and not hugely expensive.
To say that is to ignore history of the past 70 years.
Complex arithmetic computation has been in use during this time.
even in the early days of Algol
[iSUB] with the restriction that it must specify a contiguous portion of the base array.
.
That would be worse than useless.
On Sunday, September 11, 2022 at 6:14:19 PM UTC-4, co...@ccil.org wrote:
What is a "dimensioned file constant"?
What is the disallowed "format constant"? Never heard of that.
What is a "format variable"?
Pseudo-variables only on the left side of assignment statementsSo no "substr" on the right? Seems I don't get it.
No conversions between arithmetic/pictured values and string valuesWhy? Those aren't even hard to do.
No conversions between bit strings and character strings
On Monday, September 12, 2022 at 7:21:25 PM UTC-4, Robin Vowels wrote:
It is one thing to detect an error, another to provide a way to.
intercept the error and take corrective action, which is why you need a
CONDITION. Compilers have two possibilities in the absence of these conditions:
Rubbish.
Without the means of detecting such an error, there can be no error message >> nor any warning that an error occurred.
You really didn't read what I said, did you.
Which happened regularly in the days of FORTRAN. Programs just crashed.
Unless you used a Fortran checkout compiler such as WATFIV, in which case
the program still crashed, but with an error message.
PL/I was introduced in 1966; that's 55 years ago, not 35, when memory
was adequate to run PL/I and not hugely expensive.
Adequate to run it on the small problems of the day. This laptop I'm
using right now has 1024 KB (modulo 32 vs. 36 bit); how much would a System/360 of that size have cost then?
To say that is to ignore history of the past 70 years.
Complex arithmetic computation has been in use during this time.
In a niche that grows tinier and tinier as time passes. Granted,
quaternions have substantially more uses nowadays.
even in the early days of Algol
No complex numbers in Algol 60, except for a few implementations like
Georgia Tech version of Burroughs Algol, where they were added as a
student project. If you look at which other languages support them
today, the answers are Common Lisp, C/C++, and Python, all scientific programming languages.
On Monday, September 12, 2022 at 7:21:25 PM UTC-4, Robin Vowels wrote:.
It is one thing to detect an error, another to provide a way to intercept the error and take corrective action, which is why you need a CONDITION. Compilers have two possibilities in the absence of these conditions:.
Rubbish.
Without the means of detecting such an error, there can be no error message
nor any warning that an error occurred.
You really didn't read what I said, did you..
.Which happened regularly in the days of FORTRAN. Programs just crashed.Unless you used a Fortran checkout compiler such as WATFIV,
in which case the program still crashed, but with an error message..
PL/I was introduced in 1966; that's 55 years ago, not 35, when memory
was adequate to run PL/I and not hugely expensive.
Adequate to run it on the small problems of the day..
This laptop I'm using right now has 1024 KB (modulo 32 vs. 36 bit);.
how much would a System/360 of that size have cost then?.
.To say that is to ignore history of the past 70 years.
Complex arithmetic computation has been in use during this time.
In a niche that grows tinier and tinier as time passes.
Granted, quaternions have substantially more uses nowadays..
even in the early days of Algol.
No complex numbers in Algol 60,.
except for a few implementations like Georgia Tech version of Burroughs Algol, where they were added as a student project. If you look at which other languages support them today, the answers are Common Lisp, C/C++, and Python, all scientificprogramming languages.
WATFIV came quite late in the piece -- c. 1970 or so.
Before WATFOR and WATFIV, IBM's compilers merely crashed at
run time, with no information about where the error occurred.
.Adequate to run it on the small problems of the day.
They were not "small" problems.
This laptop I'm using right now has 1024 KB (modulo 32 vs. 36 bit);
In a niche that grows tinier and tinier as time passes.
I doubt it.
.No complex numbers in Algol 60,
That didn't/doesn't stop complex arithmetic from being performed in Algol.
.If you look at which other languages support them today, the answers are Common Lisp, C/C++, and Python, all scientific programming languages.
and PL/I.
On Tue, Sep 13, 2022 at 1:58 PM Robin Vowels <robin....@gmail.com> wrote:.
WATFIV came quite late in the piece -- c. 1970 or so.Luckily, I never had to suffer with such POS systems when I was writing Fortran.
Before WATFOR and WATFIV, IBM's compilers merely crashed at
run time, with no information about where the error occurred.
.Adequate to run it on the small problems of the day.
They were not "small" problems.By modern standards, of course they were. But you know that.
And that was a typo/thinko. But you knew that too.This laptop I'm using right now has 1024 KB (modulo 32 vs. 36 bit);
In a niche that grows tinier and tinier as time passes.
I doubt it.In the very beginning, all programming was scientific programming.
..No complex numbers in Algol 60,
That didn't/doesn't stop complex arithmetic from being performed in Algol.
By the same token you could do complex numbers in PL/I without COMPLEX.
The Algol Bulletin that I was thinking of was Supplement #12 <https://dl.acm.org/doi/pdf/10.5555/1064054.1064055>, and lays out three methods for doing it that were already proposed before urging that a COMPLEX keyword be added to the language. But itdidn't happen.
..If you look at which other languages support them today, the answers are Common Lisp, C/C++, and Python, all scientific programming languages.
and PL/I.*Other* languages.
John Cowan <co...@ccil.org> wrote:.
On Monday, September 12, 2022 at 7:21:25 PM UTC-4, Robin Vowels wrote:
It is one thing to detect an error, another to provide a way to.
intercept the error and take corrective action, which is why you need a >>> CONDITION. Compilers have two possibilities in the absence of these conditions:
Rubbish.
Without the means of detecting such an error, there can be no error message
nor any warning that an error occurred.
You really didn't read what I said, did you.
Which happened regularly in the days of FORTRAN. Programs just crashed.
Unless you used a Fortran checkout compiler such as WATFIV, in which case the program still crashed, but with an error message.
PL/I was introduced in 1966; that's 55 years ago, not 35, when memory
was adequate to run PL/I and not hugely expensive.
Adequate to run it on the small problems of the day. This laptop I'm1024 “K”? That’s only a megabyte. What are you using, an original IBM PC?
using right now has 1024 KB (modulo 32 vs. 36 bit); how much would a System/360 of that size have cost then?
1MB would have been a very big system in 1964. PL/I(F) was designed to run (slowly) in a 64K partition.
Robin Vowels <robin.vowels@gmail.com> wrote:Object-oriented programming wasn’t even on the table in the mid-60s.
Can't write a generic function? Ridiculous!
Your milage may vary, but I never found GENERIC to be of any use. It struck me as a half-hearted attempt at object-oriented programming, but basically it’s a form of macro.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 405 |
Nodes: | 16 (2 / 14) |
Uptime: | 49:54:47 |
Calls: | 8,497 |
Calls today: | 10 |
Files: | 13,203 |
Messages: | 5,916,579 |
Posted today: | 1 |