I was already familiar with this rant back in the day.
It complains about the first Pascal version, not the later Extend Pascal standard.
All the Pascal compilers target to professional developers had a common set of extensions mainly from USCD Pascal and Object Pascal (Apple), with Turbo Pascal being the one most compilers tried to be the most compatible with.
C was also a mess outside UNIX with compilers only partially supporting parts of it.
Worse, thanks to C lack of proper strings, arrays decaying into pointers and lack of reference parameters we have the current security situation that needs to fixed with tons of external tools.
Some criticism about Pascal is kind of unfair, the one-pass compiler nature of the original language for example made Pascal compilers so much faster.
When I tried to learn how to program I had played around with C, C++ and Basic without understanding much, but when I finally found a Pascal book and got a copy of FreePascal I really learned and understood how it works.
Nowadays I am not using Pascal any more (I am not too sad about it), but the Borland / FreePascal Dialects offer some serious benefits. For one thing the unit system is still better than what C/C++ have to offer (text-include header files, nah) ;)
Also it is worth remembering that C back then was not what it became with ANSI C and then C99. I would not like to write in that dialect, seriously.
Thinking back I think Pascal was a nice intermediate level programming language between C and Basic that was implemented in its ways for proper reasons. The text provided has very valid points on Pascal, but the arguments that C is better are only partially convincing. C is different and I would argue that it has prevailed because it is more closer to the metal.
When I joined Apple in 1987 it was a Pascal shop that had just started moving to C. The Pascal they were using had been developed and was maintained in-house and had a number of extensions, and with the exception of a few things like different semantics for pointer arithmetic and the presence of nested procedures it felt in practice nearly the same as C, just with different keywords. I wrote a ton of code in it, and I really didn't think about the difference much.
But in college I had to use unextended Pascal, and it sucked pretty hard. Maybe that's the point of a teaching language; make it stink to the point that students are encouraged to move to better languages. Maybe the current vocational approach of teaching a "Real Language" -- ahem, Java -- to beginning programmers is flawed because they're less likely to get experience with other, better languages. [I'm not sure how serious I am about this. I know that I hate Java, at least how it was circa 2001].
Another problem with teaching introductory programming in a Real Language, I think, is the temptation to also teach more software engineering-like things as well.
When you start measuring your experience with programming in decades rather than years, it's hard to remember learning how to program is actually kinda hard. Thus, adding things like version control and IDEs to the mix gives you less time on teaching what should be the core of an introductory programming class: how to solve problems in code. Anything else is fluff that can be ignored until the foundations have been laid.
An additional reason I think using something "weird" like Haskell or Scheme is that it's a very good equalizer (Haskell in particular). IME, this kind of class will have two kinds of student: those who already know how to program, and those who've never programmed. Those who already know how to program are mostly going to ignore the class, simply because it's known to them already; and this is a problem because the interactions between strong students and weaker ones is massively helpful, to both parties. Teaching things is, somewhat ironically, perhaps the very best way of focussing your knowledge of it. When you're explaining stuff to yourself (as it were), you can fudge the details you're a bit vague on (which is generally thue tricky bits), but if you're explaining it any vagueness is painfully obvious (I suspect this is also the reason simply explaining a problem to someone can be so helpful).
I think the move to safer languages for CS education is more to encourage people to think about the CS lessons at hand, rather than software engineering.
Learning about various list types is much easier if you don't have to worry about randomly crashing things. Learning about recursion is better in a language suited for it.
My CS education was founded around Scheme in part because it was a good language for showing how things worked. I thought the school went a little too far in that direction because outside of SQL, I had to teach myself every language I worked with thereafter. But... It did prepare me to learn those languages.
I learned programming with Pascal in high school, and it definitely didn't stink. It's way easier than C and lets you focus on the actual programming, not the idiosyncrasies of the language. It's very much like Python in this regard, but I think it's even better as a first languge. It's more explicit and to someone completely new to programming, that really pays off IMO.
- the absence of global state
- array dimensions part of the type
may have been considered defects back then,
but are currently seen as a good thing.
[For example, in Haskell, they consider it fancy that you can add dimensions to your type signature so the compiler can check if you're not doing something silly.]
Also, I programmed extensively in Pascal using the Borland IDE in the early 90s and it was one of the best IDEs I ever encountered.
As troll bait, let me just throw in this: the compiler had better inline assembly than what gcc provides 20 years down the road.
C also has arrays with dimensions as part of the type. The trick is that the dimension must be determined statically. This is different than vectors in Haskell which allow the size of the vector to be determined (and even vary) dynamically, yet still guarantee memory safety statically (I.e. no runtime cost for bounds checking).
You can think of an array with a static size of 10 as being like shorthand notation for a struct with ten fields (sans padding). It really is no more complicated than that.
C++ has also realized that array dimensions as part of the type are the right way forward. It's encouraged that you use std::array and avoid plain old arrays (which can't work in combination with smart pointers, for example).
33 years later, none of this is true of FreePascal, Delphi, or any modern variant. Except maybe the cosmetics. If you think {!@#$} is easier on the eyes than begin end; well that's like your opinion, man.
I remember first learning Pascal and hated it. It felt very restricted and difficult to get real work done. The type checks that are worshiped nowadays felt like a straitjacket in Pascal. C was a totally different experience. It was so open and free of restriction that I could hack anything with it. Pascal was a beginner learning language but C was hacker's language.
Yup. Moving from Pascal to C gave me the same sort of freedom rush as moving from C to Ruby. That said, I don't use Ruby anymore, apart from the occasional command-line tool, but I still use C a lot.
I have done a lot of Javascript in the last few years though, and oddly it didn't give me that same feeling of freedom, but that might be because I'd already experienced Ruby.
Very nostalgic :-). I learnt the concept of pointers in Pascal. I think it was taught for two semesters at Mysore and Bangalore university colleges. We however quickly moved on to C as that came during the final year of graduation. Fortran -> Pascal -> C was sort of general trajectory couple of decades ago in engineering colleges in India. And in all this there was Cobol; I wonder whether it's even taught now a days!
[+] [-] pjmlp|11 years ago|reply
It complains about the first Pascal version, not the later Extend Pascal standard.
All the Pascal compilers target to professional developers had a common set of extensions mainly from USCD Pascal and Object Pascal (Apple), with Turbo Pascal being the one most compilers tried to be the most compatible with.
C was also a mess outside UNIX with compilers only partially supporting parts of it.
Worse, thanks to C lack of proper strings, arrays decaying into pointers and lack of reference parameters we have the current security situation that needs to fixed with tons of external tools.
[+] [-] wirrbel|11 years ago|reply
When I tried to learn how to program I had played around with C, C++ and Basic without understanding much, but when I finally found a Pascal book and got a copy of FreePascal I really learned and understood how it works.
Nowadays I am not using Pascal any more (I am not too sad about it), but the Borland / FreePascal Dialects offer some serious benefits. For one thing the unit system is still better than what C/C++ have to offer (text-include header files, nah) ;)
Also it is worth remembering that C back then was not what it became with ANSI C and then C99. I would not like to write in that dialect, seriously.
Thinking back I think Pascal was a nice intermediate level programming language between C and Basic that was implemented in its ways for proper reasons. The text provided has very valid points on Pascal, but the arguments that C is better are only partially convincing. C is different and I would argue that it has prevailed because it is more closer to the metal.
[+] [-] kabdib|11 years ago|reply
But in college I had to use unextended Pascal, and it sucked pretty hard. Maybe that's the point of a teaching language; make it stink to the point that students are encouraged to move to better languages. Maybe the current vocational approach of teaching a "Real Language" -- ahem, Java -- to beginning programmers is flawed because they're less likely to get experience with other, better languages. [I'm not sure how serious I am about this. I know that I hate Java, at least how it was circa 2001].
[+] [-] arnsholt|11 years ago|reply
When you start measuring your experience with programming in decades rather than years, it's hard to remember learning how to program is actually kinda hard. Thus, adding things like version control and IDEs to the mix gives you less time on teaching what should be the core of an introductory programming class: how to solve problems in code. Anything else is fluff that can be ignored until the foundations have been laid.
An additional reason I think using something "weird" like Haskell or Scheme is that it's a very good equalizer (Haskell in particular). IME, this kind of class will have two kinds of student: those who already know how to program, and those who've never programmed. Those who already know how to program are mostly going to ignore the class, simply because it's known to them already; and this is a problem because the interactions between strong students and weaker ones is massively helpful, to both parties. Teaching things is, somewhat ironically, perhaps the very best way of focussing your knowledge of it. When you're explaining stuff to yourself (as it were), you can fudge the details you're a bit vague on (which is generally thue tricky bits), but if you're explaining it any vagueness is painfully obvious (I suspect this is also the reason simply explaining a problem to someone can be so helpful).
[+] [-] mathattack|11 years ago|reply
Learning about various list types is much easier if you don't have to worry about randomly crashing things. Learning about recursion is better in a language suited for it.
My CS education was founded around Scheme in part because it was a good language for showing how things worked. I thought the school went a little too far in that direction because outside of SQL, I had to teach myself every language I worked with thereafter. But... It did prepare me to learn those languages.
[+] [-] abroncs|11 years ago|reply
[+] [-] toolslive|11 years ago|reply
[For example, in Haskell, they consider it fancy that you can add dimensions to your type signature so the compiler can check if you're not doing something silly.]
Also, I programmed extensively in Pascal using the Borland IDE in the early 90s and it was one of the best IDEs I ever encountered.
As troll bait, let me just throw in this: the compiler had better inline assembly than what gcc provides 20 years down the road.
[+] [-] Havoc|11 years ago|reply
Also...stupidly fast build-times. First time I compiled something on VS I thought the thing had frozen. Nope...just slow.
[+] [-] hyperpape|11 years ago|reply
[+] [-] habitue|11 years ago|reply
You can think of an array with a static size of 10 as being like shorthand notation for a struct with ten fields (sans padding). It really is no more complicated than that.
[+] [-] sparkie|11 years ago|reply
[+] [-] gfody|11 years ago|reply
[+] [-] tdsamardzhiev|11 years ago|reply
[+] [-] V-2|11 years ago|reply
[+] [-] V-2|11 years ago|reply
[+] [-] ww520|11 years ago|reply
[+] [-] pjmlp|11 years ago|reply
The Hacker's language, back when I was coding in Turbo Pascal was called Assembly.
C was just for UNIX or when you wanted to do UNIX homework on your Atari ST/Amiga.
[+] [-] antimagic|11 years ago|reply
I have done a lot of Javascript in the last few years though, and oddly it didn't give me that same feeling of freedom, but that might be because I'd already experienced Ruby.
[+] [-] xxs|11 years ago|reply
[+] [-] vishnugupta|11 years ago|reply
[+] [-] barrystaes|11 years ago|reply
Also if you are a Pascal/Delphi guy/gal and need to build web applications, check out the smart fellows at http://smartmobilestudio.com/
[+] [-] adamnemecek|11 years ago|reply
[+] [-] V-2|11 years ago|reply
[+] [-] fredvs|11 years ago|reply
http://wiki.freepascal.org/Why_Pascal_is_Not_My_Favorite_Pro...
[+] [-] Tloewald|11 years ago|reply