7 ms·
I feel kind of sheepish to admit that "Why Pascal is not my favorite programming language" had a huge impact on me and caused me to avoid Pascal until I was for
by krylon 9y ago
I feel kind of sheepish to admit that "Why Pascal is not my favorite programming language" had a huge impact on me and caused me to avoid Pascal until I was forced to deal with it because a coworker quit and dropped maintenance of an in-house application in my lap.
I was happy to realize that most of the criticism in that essay no longer applies to relatively recent versions of the language/IDE (Delphi 7 in my case).
One huge advantage if Pascal is that it is very easy to read; the code does not look or feel pretty, but it is so easy to read I could get an idea of what was going on without any prior knowledge of Pascal within a few hours.
Keywords not being case-sensitive felt weird at first, but one gets used to it very quickly.
- pjmlp 9y agoMost of that criticism was already wrong when compared against Turbo Pascal 6.0 on MS-DOS (the 7.0 major improvement was DOS extender support).
- kylecordes 9y agoDelphi 7 was released in August 2002 (at least according to the Wikipedia page), over 15 years ago. It's hard to think of this as relatively recent.
- varjag 9y agoIt's 21 years newer than the critical article he mentioned..
- narag 9y agoBut that article was not 21 years newer than the first version of TP that was released in 1983.
- varjag 9y agoThe first version of Turbo Pascal didn't have object system or modules.
- narag 9y agoIf you read my comment in the context of the thread, your comment makes no sense. The original article was written by one of the authors of C, that had no proper modules or object system either.
- varjag 9y agoI take it you didn't read the article being discussed here, titled "Why I use Object Pascal". Delphi and UCSD Pascal (at the time of Kernighan's article) are related but not identical. Anyway, my point was that 15 years old tool can't be dismissed as "ancient" when the critical write-up itself is 36 years old.
- narag 9y agoEssential quoting of the thread: 1. "I was happy to realize that most of the criticism in that essay no longer applies to relatively recent versions of the language/IDE (Delphi 7 in my case)." 2. "Delphi 7 was released in August 2002 (at least according to the Wikipedia page), over 15 years ago. It's hard to think of this as relatively recent." 3. "It's 21 years newer than the critical article he mentioned.." 4. "But that article was not 21 years newer than the first version of TP that was released in 1983." 5. "The first version of Turbo Pascal didn't have object system or modules." Now, you can make your version of what we had in mind when we wrote each comment, but I'm very sure that others would agree that 2 was trying to say that criticism was invalid much earlier than 2002. So when you say that the original article was much older in 3, it seems obvious that you're trying to say that criticism was valid because the article was about a much older version. And then I point in 4 that criticism was no longer valid much earlier than 2002. And then you point in 5 that TP didn't have object system or modules that's a complete non sequitur because the original criticism hardly could criticize lack of object system when its author had not made one for his own language. Actually there's a lot to say against the original article, but that's another story.
- varjag 9y agoFirst version of Turbo Pascal isn't the language discussed in the topical write-up. Of course Kernighan couldn't be criticising Object Pascal; and the author points out that the language has picked up new features since which makes it far more bearable to him. The point was raised that Delphi isn't "relatively recent", and if that's true, from points 1&2 it then follows that the original Kernighan criticism still applies to it. I pointed out that the criticism is much older than Delphi, giving enough grounds to think an improvement is possible in the timespan of two decades. Then you come with Turbo Pascal 1.0 out of left field, which bears no relation to any of the points. Noone was stating Turbo Pascal 1.0 is a "relatively recent" language, nor that the K's criticism wasn't a good summary of TP1.0 era state of the art.
- jandrese 9y agoMy High School programming class was taught in Pascal (Turbo Pascal version 3 IIRC). I remember liking it just fine, but when I went to the university I switched to C because everything interesting was written in C. Also, there were no Pascal compilers in the FreeBSD (2.0) ports tree back then. I had a notion that Pascal was a "toy teaching language" too, but for what I was doing that didn't really matter.
- stevoski 9y agoYou've described my experience exactly. Once I got to learn C at university, I felt that I was now using a "grown up's programming language". It took a few years to realise that C's manual memory management and explicit pointer handling was making me much less productive as an application programmer.
- jandrese 9y agoIt's not like Pascal's memory management and pointer situation was that much better.
- pjmlp 9y agoThey actually are, because Pascal knows the size of its types, while C requires using a mix of sizeof and malloc, which many people still get wrong, specially with arrays.
- klipt 9y agoOf course in C++ you can just use a vector. Object Pascal is certainly closer to C++ than C. The main advantage of Pascal is super fast compilation, but C++ modules should close that gap once they make it into the standard.
- pjmlp 9y agoWhich is why C++ became my next favourite language after Pascal, and I joined the C++ side of the C++ vs C USENET "arguments".
- emodendroket 9y agoDespite that article being a venerated classic I felt kind of put off when I first read it because the part about arrays and strings having sizes seems... well, I guess it's aged poorly.
- Idontknowmyuser 9y agoIn the old versions of Pascal a function/porcedure only accepted an array of a fixed size (in fact you had to declare a type specifically for that size). for example if you had an array of 10 and an array of 100 you needed to write two functions to deal with it. I was taught turbo Pascal in highschool and it was so bad that even C felt less annoying.
- emodendroket 9y agoOh, I see. I can understand why that would be irritating.