3 ms·
Kernighan wrote that in 1981. As late as 1988, I was (unwillingly) using an original, non-extended Pascal. Those were still out there, still being used. And,
by AnimalMuppet 5y ago
Kernighan wrote that in 1981. As late as 1988, I was (unwillingly) using an original, non-extended Pascal. Those were still out there, still being used.
And, all Pascal dialects had some construct. They had different constructs. If you wanted to be portable, you couldn't use any of them (until the Extended standard came out). Kernighan notes those extensions, but does not accept them as a solution because of their non-portability. You may think that he is more dismissive than he should be here, but at that time, C was considerably better on code portability.
And when you say that Kernighan was acting as a propagandist, I wonder whether you are being one. You certainly seem to have a message to sell when it comes to Pascal vs C...
- pjmlp 5y agoSo apparently ignoring that C was subject to the same dialects problems outside UNIX doesn't count. Nor that Modula-2, designed to fix all those issues with ISO Pascal, was in use since 1978. Yeah, whatever.
- AnimalMuppet 5y agoPretty sure you could allocate a variable-length array in C without tripping on dialect issues, in or out of Unix. It may have had such issues, but they were much less fundamental than in Pascal.
- ncmncm 5y agoVarious C implementations had extensions, but you rarely needed to depend on any of them to do useful work. All the UNIX utilities were written without using any. Implementations for x86 had a mess of different pointer types, but to build the same program for a non-crippled CPU you could #define the extra keywords to the empty string.
- AnimalMuppet 5y agoLate addendum, just in case anybody reads this: Kernighan wrote that paper after writing "Software Tools In Pascal", and finding it considerably harder than it should have been to write that kind of thing in Pascal. (The predecessor book, "Software Tools", was written in RATFOR, and Pascal should have been miles better to write software in.) In this book, they (Kernighan and Plaugher) tried to write code that would work in Pascal, not just in one dialect of it. That is, portability was essential to the code they were writing for the book. That may have lead to a greater emphasis on portability in Kernighan's paper than one might think warranted by the general situation.