To your second point, yes. To your third point, standard pascal does not give you the same direct access to the hardware as C/C++. |
Hold on.
Neither does C or C++. Hardware access comes through library functions.
The reason we are all sitting around programming our own home computers is because of Pascal. Not C. Borland's Turbo Pascal revolutionized the programming market because Pascal is a strongly, statically typed language that compiles far more quickly than C ever could and catches errors that even lint couldn't, using a clean, straightforward syntax and a significantly more organized structure than C ever had.
Pascal was used to create the original Mac OSes. People writing C compilers had to modify the language to interface with
Pascal calling conventions on the Mac, not the other way around as it is more common today.
While C was written with the ability to compile an OS in mind, and Pascal wasn't, neither are the same language that they were originally. Both have had significant improvement.
Kernigan's lambastes of Pascal weren't entirely without merit, but they were overdone. Notice how everyone (including C++) is moving towards managed pointers and more strict typing? Remember that Pascal has
always had that? Hmm.... perhaps the pundits did brainwash us into believing their premature opinions after all.
But my biggest grief (besides being partial to Pascal) is the comparison of C/C++ (modern stuff) to "standard pascal" (ancient stuff) in order to belittle it. Shame.
To properly answer the question, the Pascal language is designed to make optimizations
easier and
more significant than is possible in C and C++. That is
not to say that C and C++ can't be similarly optimized, only that it is an order of magnitude more difficult. Both ancient and modern Pascal programs compile to
very small,
very fast systems, something you need to spend some time and effort to accomplish in C++. Notice also that I did
not imply that it is impossible to write very poorly optimized Pascal programs, because it certainly is.
Embarcadero's Delphi XE (who bought Borland Delphi, which is an Object Pascal variant) is primarily used for a number of things, including writing
systems software (like device drivers and system components) for Windows.
Also,
any language that gives you the ability to manipulate machine data directly and access assembly modules, like C, C++, and Pascal, can be used to write an OS.
Beware that you are asking this question on a C++ forum. Most people who frequent here are rabid C++ people, and some even have axes to grind against languages other than C and C++.