3 ms·
I expected perhaps a reference to Brian W. Kernighan's excellent critique of Pascal from a systems programming perspective: https://www.lysator.liu.se/c/bwk-on
by jll29 2y ago
I expected perhaps a reference to Brian W. Kernighan's excellent critique of Pascal from a systems programming perspective:
https://www.lysator.liu.se/c/bwk-on-pascal.html https://www.lysator.liu.se/c/bwk-on-pascal.html
I love Pascal's clarity, and enjoyed writing several years of Pascal and two years worth of Modula-2 in the 1980s and 1990s, but one has to admit Brian has some good points.
If Pascal was still actively used by more people, a new version of its ISO standard could incorporate many things that "happened since" if the community so choose.
- pjmlp 2y agoThat version not only did exist, it was called ISO Extended Pascal, however by then Apple's and Borland's Object Pascal was what everyone cares about. That critic has nothing of excellent other than for UNIX heads. It ignores that for quite some time, outside UNIX, C only existed in various dialects of K&R C like Small-C, RatC, and whatever else was around on CP/M, competing mainframes and what not. Also ignores the existence of Modula-2, released three years prior to that rant.
- AnimalMuppet 2y agoThat wasn't a "rant", no matter how much it offends you. Here's what it actually was: Kernighan and Plaugher wrote a book called "Software Tools". The code in it was written in RATFOR, which is a preprocessor for FORTRAN. After that book was written, Kernighan got the idea of re-writing it using Pascal. And it was hard - much harder than he expected. So after he did so, he asked himself, "Why was that so hard? Pascal should have been much better than RATFOR, and it wasn't. Why not?" That's what the paper is about. (It's not even about C, so what C dialects existed, and where they existed, is completely irrelevant.) And the paper says that's what it's about. And, having used an ISO standard Pascal, every word of it is true. (The only exception was that we had separate compilation.) Almost everything he said, I ran into. The problems were real, and they were painful. Why didn't he use Modula-2? Because he didn't write the book in Modula-2. And why didn't he do that? He started the book in March 1980. Modula-2 probably had much less traction than Pascal at that time, so Pascal was a more reasonable language to pick for the book.
- pjmlp 2y agoNot only it is a rant, it shows the ignorance of the Pascal ecosystem, or the unwillingness to actually learn or make a fair point. Otherwise getting an augmented Pascal system like plenty folks were doing shouldn't have been a big problem. The situation with C is fully relevant, because it shows the duality of his views, in a text that is used as a kind of biblical message by many UNIX monks. I also have used ISO Pascal, only because the university professor was religious about it on assignments, as the DG/UX Pascal compiler had enough extensions to our disposal.
- Rochus 2y agoThe success of the extensions added to UCSD, Apple, Lisa and Turbo Pascal demonstrate that Kernighan's findings, which only focused on Wirth's original Pascal, were not as wrong as you assume. Lisa, Turbo, Object and VAX Pascal essentially supported the same kind of pointer manipulation as C. And if we take a close look at the Oberon System, even Wirth depended on this feature (although it was actually a backdoor of the language and bypassed the type checker), or he directly escaped to assembler.
- pjmlp 2y agoSame can expressed to the success of the extensions added to K&R C, starting by inline Assembly, but apparently extensions in C were good to have, bad in Pascal. Two weights, two measurements.
- Rochus 2y agoApparently K&R C (which was the version at the time of Kernighan's paper) wasn't good enough itself, and it's fair to say that ANSI C also borrowed features from Pascal (e.g. function prototypes). So the influence was mutual. And I think it's pretty evident that the extensions made by UCSD and later Pascals to Wirth's original version were essential for the success. I don't think that the typical Turbo Pascal user cared much about Wirth's original version.
- AnimalMuppet 2y agoThat was written about the "standard Pascal" (the first standard). Turbo fixed most of that. (Maybe all, in that Turbo became a de-facto standard, so that even the "all the extensions are non-standard" didn't really apply.)
- Rochus 2y ago> Brian W. Kernighan's excellent critique of Pascal Well, most of it was obsolete before the paper appeared (see Apple and Lisa Pascal), and the reason Pascal became very popular in the eighties was not the version Wirth created, but products like Turbo, VAX or Object Pascal, or the ones mentioned, and of course later also Delphi. Even Wirth himself demonstrated in his Oberon System, that the system could not be implemented without direct memory read write and pointer arithmetics (via SYSTEM module, and mostly without support of a type checker). The Pascal ISO standard came much too late and had little significance.