It prevailed because it was married with an OS (UNIX) that spread into the enterprise.
History proves that system programming languages only survive when they are married with an OS and are the only supported language(s) in the OS vendors SDK.
There wasn't nothing in C that couldn't be done in then existing Pascal dialects.
[1] http://web.stanford.edu/class/cs240/readings/worse-is-better...
It has quite a good design decisions, but I consider that adjective for Xerox PARC systems, specially Mesa/Cedar.
> But I do think C being closer to the metal is what made it popular.
I keep hearing this from C proponents, yet I never found a use case where C dialects (this was before standards were widespread) offered more close to the metal features than Pascal dialects or other system programming languages for that matter.
Every time I ask a C code to tell me a closer to the metal feature other system programming language compilers lack, I come out empty handed.
> Pascal dialects
This is, of course, the important point. The 1974 Wirth defined version of Pascal was pretty crappy, or at least limited, as a systems language and even the 83 ISO standard didn't much change that. However, the variations and extensions that emerged fixed those shortcomings pretty fast, to the extent that Kernigans paper was almost out of date wrt "contemporary" Pascal when it was published.
When I first saw Turbo Pascal compile I couldn't believe my eyes. I was used to the c compilers (well, one in particular) that used 4-pass processes- and each pass seemed to take longer than TP.
The old MS C Compiler for MS-DOS did really, really suck.
C uses indexes starting from 0, Pascal does not.
Pascal usually does not come with strong memory layout guarantees that one knows from C (packing of structs, unions, etc.)
Typecasting in Pascal is a matter of dialect.
There are probably more but I cannot remember them because I have not used Pascal in a very long while.
Only ANSI/ISO C11 does provide strong memory guarantees. Back then there wasn't even a C standard.
I think that's the great strength and great weakness of each language.
You mean
var
buffer : array [0..$3FFF] of byte absolute $B800:$0
?An array, protected with bounds checking accessing any memory address, provided the OS protection allows it.
Don't want bounds checking? Make use of {$R-}
(Turbo Pascal on CP/M-80 was my goto for a number of years)
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.