At 2025-03-09T08:29:43-0400, Clem Cole wrote:
On Sat, Mar 8, 2025 at 10:47 PM Dan Cross
<crossd(a)gmail.com> wrote:
Was any consideration for it made?
Only Ken can answer that. My guess is that Algol-W would have failed
for the same reasons Pascal ultimately failed. It really was
directed at students and lacked many of the tools C had. Many of the
issues exposed in Brian's treatise *"Why is Pascal not my favorite
programming language"* also apply to Algol-W.
I think it's worth noting that, as I undertand it from having read the
paper, old Pascal manuals, and ISO 7185 (and, a long time ago,
experience with Borland Turbo Pascal), most or all of the defects
Kernighan pointed out were addressed by vendored versions of Pascal and
ultimately by its ISO standard form. I think even UCSD Pascal had
extensions, though I don't recall what they were.
My grasp of the chronology is poor, though, and I'd concede that Wirth's
Pascal of his 1973 memorandum wears most or all of the mud Kernighan
threw at it. For the most part, solving the problems Kerngihan observed
did not require doing violence to the language (in other words, they
could be solved with extensions rather than by altering the semantics of
valid 1973 Pascal syntax).
Maybe this is what it means to have been "directed at students"--that
easy wins in terms of language improvement were not implemented because
covering them topically in a semester-long university course would not
have been practical. If so, that may make the tragedy of Pascal
greater, not smaller.
Though even that doesn't explain why Wirth didn't spec Pascal functions
to admit polymorphism (perhaps optionally) in array length. That's an
essential property for all sorts of work, even that undertaken by
students. (Say you want them to write a function that multiplies
matrices. You shouldn't have to specialize the function by matrix
dimensions. The obvious pinch point for a Unix programmer is massive
inconvenience if you want to handle variable-length strings.)
Perusing its manual some months ago, it occurred to me that if someone
had had the foresight to implement the language core of Turbo Pascal
7.0, ignoring the libraries/"modules" entirely, and omitting the crap
necessary to work with the x86 segmented memory model, I don't think
Kernighan would have had much, if anything, to complain about. And, in
my opinion, we'd be living in a better timeline.
But I guess Pascal just didn't get good enough, soon enough.
And I wonder how big such a compiler would be, even if coded
competently.
Chronology bedevils us in another way. A _lot_ of C language features
its advocates are proud of were not present in 1973 or even when
Kernighan wrote CSTR #100 around 1980. It is an error to substitute the
ANSI C of 1989 for the C that actually existed at the time when asking
who'd win in a fight between C and Pascal taking place in, say, 1977.
https://gunkies.org/wiki/Typesetter_C
Regards,
Branden