← Back to context

Comment by adrian_b

9 hours ago

Standard Pascal had some very serious design mistakes, which are less obvious for those who have used only extended variants, like Turbo Pascal or Extended Pascal, where some of the mistakes had been corrected.

Probably the greatest mistake was that arrays of different sizes were different types in Pascal. While C had extremely poor support for arrays in comparison with older languages like Fortran, PL/I or Algol 68, Pascal was even worse, because in Standard Pascal it was pretty much impossible to write a library implementing linear algebra algorithms.

Actually in Standard Pascal it was impossible to write any kind of library, because separate compilation was impossible.

Turbo Pascal was a decent programming language, but only because it had a lot of essential extensions over Standard Pascal, including the ability to write multi-file programs.

The languages designed by Wirth have become very well known, because he and others have written some very good books about them for beginners and they were used in teaching in many places, but all of his languages were quite bad in comparison with the languages that he wanted to replace, because he thought that they were too complex, e.g. Algol 68 and Xerox Mesa.

> in Standard Pascal it was pretty much impossible to write a library implementing linear algebra algorithms

You likely mean Wirth's original Pascal; "Standard Pascal" (i.e. ISO 7185) had support for actual array parameters with different bounds or lengths than the formal parameters ("conformant array parameters"), and there was also separate compilation in a later standard. And the original Modula-2 and Oberon versions supported both, open array parameters and separate compilation. I don't think that the original Wirth or Standard Pascal versions ever were popular. The language's massive popularity during the eigthies was driven by a few distinct, significantly extended dialects (UCSD, Lisa, Mac, VAX and Turbo Pascal, and later Delphi). Wirth himself didn't care about standardization nor industry demands.

Why bring Standard Pascal to the party?

It is always used as an example of how bad Pascal used to be.

Yet it always gets forgotten that only lousy UNIX compilers, or some 8 bit implementations, ever did nothing else.

It was created to learn programming, the Python of 1970's, quickly everyone else was using UCSD Pascal and various other extensions (which apparently are always cool when the language happens to be C), which were later standardised under Extended Pascal.

Although, yet again, GNU Pascal is probably the only UNIX compiler that supported it until FreePascal came to be.

Niklaus Wirth designed Modula-2 in 1978, thus still in the same decade as Pascal, exactly for systems programming and large scale software development.

Borland helped spread Apple's Object Pascal, designed with feedback from Niklaus Wirth, beyond Apple ecosystem, to what we foundly remember nowadays.

Yet Standard Pascal has to keep coming up all the time.