4 ms·
Back in the mid 80s, the CS program at my Uni switched from Pascal to C as the standard course language. C always felt like a crippled death trap in comparison
by Roboprog 10y ago
Back in the mid 80s, the CS program at my Uni switched from Pascal to C as the standard course language. C always felt like a crippled death trap in comparison, even if real work would have had to have been done in Modula, rather than actual Pascal. C has a nice data literal mechanism, and return/break, but all the things you gave up: array bounds checking; references that couldn't be null; subrange types; non-int enums; arbitrary array indices; sets; nested subroutines.
How many people even realize that C++ (formerly "C, with classes") is largely just a rehash of the Simula preprocessor (for Algol) from the 60s?
That said, I think the Unix creators meant for C to be an assembly alternative bootstrap language, not the primary development tool for almost all applications.
In a sense, the rise of microcomputers was a disaster for programming language development, or at least a mixed bag in the short run.
- AnimalMuppet 10y agoHaving worked in both, Pascal (at least in the 1980s) felt like trying to work inside a straightjacket. Perhaps the worst example: The size of an array was part of the type of the array. This means that you couldn't access outside of the array. That was good. It also meant that you couldn't have a variable-sized array, because there was no possible type for it to have! That was really problematic at one particular point when we needed to deal with a variable-sized 2D array. We wound up having to create the maximum size we had memory for, and only use the subset that we needed, which to this day I consider a kludge to deal with a language limitation. For more, Google for "Why Pascal Is Not My Favorite Programming Language". Despite being written by Kernighan, it's not a Pascal-vs-C evaluation - it's more Pascal-vs-Ratfor, with Pascal coming off rather badly for real-world use. For university teaching, though, Pascal was probably better...
- Roboprog 10y agoThe fixed size array limitation of the 1970 CDC Cyber teaching version usually gets an extension in the (Modula or Modula inspired) versions that people actually use. E.g. - http://www.freepascal.org/docs-html/ref/refsu69.html http://www.freepascal.org/docs-html/ref/refsu69.html https://www.modula2.org/sb/m2_extensions.htm https://www.modula2.org/sb/m2_extensions.htm Yes, I've read "... Not My Favorite ..." (and "Worse is Better", and "Unix ... C ... Hoax")
- AnimalMuppet 10y agoYes, I know there was an extension. Unfortunately, the one I had to use didn't have it, so I was trapped.