4 ms·
Pascal had problems that kept users from doing anything useful with it. Real-world implementations included bypasses for the problems, but then they weren't re
by throwaway81523 5y ago
Pascal had problems that kept users from doing anything useful with it. Real-world implementations included bypasses for the problems, but then they weren't really implementing Pascal any more. Kernighan's famous article "Why Pascal Is Not My Favorite Programming Language" explains more:
http://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pascal.html http://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pasc...
- kortex 5y agoWow, that is incredibly damning. Is it actually true that arrays of different lengths are different types, and there is no way to write generic array methods? And there's no way to cast byte arrays into structures? I almost can't believe it - a language without both features, and without any kind of escape hatche to me feels forever bound to be a toy language. But that would absolutely answer OP's question - it never took off cause IO is completely hamstrung. Programs need IO, and lots of it, with lots of flexibility, to do anything interesting. Edit: I said I was a bit incredulous of the claims. If true, those would be bad features.
- pjmlp 5y agoOnly if one only looks to the original Pascal language as means to sell their propaganda. All Pascal dialects, and the Extended Pascal standard that improved the original one, had the array of <type> construct that allows you to query for the actual bounds. Type conversations were also available, again in all dialects. Naturally, those variants were ignored, as Kernighan had a message to sell.
- kortex 5y agoThanks for clearing that up
- pjmlp 5y agoHere is Object Pascal for Mac OS, https://www.folklore.org/StoryView.py?project=Macintosh&story=3rd_Party_Developers_and_Macintosh_Development.txt https://www.folklore.org/StoryView.py?project=Macintosh&stor... http://preserve.mactech.com/articles/mactech/Vol.02/02.12/ObjectPascal/index.html http://preserve.mactech.com/articles/mactech/Vol.02/02.12/Ob...
- Turing_Machine 5y ago> Naturally, those variants were ignored, as Kernighan had a message to sell. Those variants were "ignored" because they largely didn't exist. Kernighan's essay was written in 1981. The first release of Turbo Pascal wasn't until 1983. The Extended Pascal standard wasn't released until 1990.
- pjmlp 5y agoUCSD Pascal in 1977, Concurrent Pascal in 1974, DEC Pascal in 1981, and you can follow up in another dates here, http://pascal.hansotten.com/ http://pascal.hansotten.com/ And then there is the detail that Modula-2 was released in 1978, exactly with the goal to fix all original Pascal issues for systems programming.
- throwaway81523 5y agoModula-2 was at best obscure at the time, while Pascal was popular. Kernighan got involved with Pascal in order to write the Pascal version of "Software Tools", called Software Tools in Pascal. He wrote "Why Pascal is not my favorite PL" as a result of that book effort. I believe that is explained in the article. If there had been enough demand to also do a Modula version of the book, he might have written a more favorable article about Modula afterwards.
- pjmlp 5y agoObscure, when the book was published three years earlier. And based on Mesa, used at Xerox PARC. Then again, ignoring systems languages outside Bell Labs seemed to have been a thing back in the day.
- throwaway81523 5y agoYou are missing that Software Tools was written for a popular audience, more or less. The Pascal edition was written because people were using Pascal and wanted it. Nobody was asking for a Modula-2 edition.
- 5y ago
- AnimalMuppet 5y agoKernighan 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.
- citrin_ru 5y agoIt hardly a factor IMHO. All non-dead languages add new features over time and there is nothing wrong with this if features well designed. Turbo Pascal allowed to implement anything one can implement in C. Pascal is not so concise as C but more readable to me (and I read a lot of C, so it is not because I don’t know C).
- Tozen 5y agoThere is a strong argument that the accusation of Pascal not being useful, is not anything based on facts, history, or reality. It is also weird to put Pascal into a box, as if the language is not allowed to evolve/change. C and C++ is not the same language that it was 20 years ago. Doesn't make sense to have this expectation for Pascal. In addition, you can't gloss over that the different dialects of Pascal addressed issues. For those that program with Pascal, these differences are often minor or considered a plus. You can choose the dialect that best suits your needs. Many would say that it is unfair to bring up Kernighan's 40 year old paper (from 1981). Things in the Pascal world changed almost immediately after it was published. Turbo Pascal came out in 1983, and addressed various issues. Then Apple created Object Pascal in 1986, addressing even more. Then came Delphi (1995) and Free Pascal/Lazarus (1997). Take a look at the below link, Which addresses most points outlined in the paper, in terms of modern dialects of Pascal/Object Pascal. https://wiki.freepascal.org/Why_Pascal_is_Not_My_Favorite_Programming_Language https://wiki.freepascal.org/Why_Pascal_is_Not_My_Favorite_Pr... Arguably, Kernighan created a "hit piece" paper for AT&T Bell Laboratories (they are on the document). AT&T was pushing C and then C++, so were very much trying to take down Pascal. This is a document that was "weaponized" to be used against competition, and very strangely, it still being used as such when most of the points presented are no longer relevant.