Pascal, a descendant of ALGOL 60 and darling of computer science courses for decades, turns 50 this year.
For engineers of a certain age, Pascal was hard to avoid in the latter part of the last century. Named for 17th-century French mathematician Blaise Pascal, the language is attributed to Swiss computer scientist Niklaus Wirth and was created in part due to Wirth's frustration with the process to improve the ALGOL 60 language.
Involved in the ALGOL X effort, Wirth proposed ALGOL W, which, while not deemed a sufficient advance over ALGOL 60, became Pascal in 1970.
Originally intended as a small and efficient language – vital for the computers of the day – Pascal was also pitched as a useful way to teach good programming practices and featured strong typing as well as complicated data types. Becoming very successful in the 1970s, it was a staple of university computer science courses by the 1980s (including one attended by this writer).
While many Pascal compilers were created over the years for a variety of purposes (a common one being self-hosting), a pair of notable implementations existed in the form of UCSD Pascal and Borland Software Corporation's flavours, Turbo (later Object) Pascal and Delphi.
The former, created by the University of California, San Diego (UCSD), was an intriguing implementation initially aimed at providing the same environment for students over the differing minicomputer platforms available at the time.
Led by the late Kenneth Bowles, the UCSD Pascal programming system consisted of the language, an operating system and a suite of tools. Tweaked to run on the microcomputers of the day and being pretty much hardware independent through use of what looks suspiciously like a virtual machine, UCSD Pascal cropped up in many places, from the IBM PC to the Apple II. Even a TI-99/4A equipped with a p-code card could run the system.
UCSD Pascal made use of the Pascal-P2 compiler, one of four emitted by the Zurich team and aimed at promoting the propagation of the language. Hugely popular, its crown did not slip until another implementation put in an appearance.
Based on the Blue Label Pascal compiler by Anders Hejlsberg, Turbo Pascal arrived in 1983 courtesy of Borland. Dubbed "Turbo" due to the speed of compilation and the executables spat out, the system was quite revolutionary for the time. The development environment made the language accessible to those more used to BASIC and the performance was a considerable step up from the interpreted languages that had gone before.
Versions existed for computers running the likes of DOS and CP/M, and the whole thing would cheerfully run on a single floppy disk and in 64KB of memory.
Turbo Pascal would go through multiple iterations, dropping support for CP/M as it did so, but it would take until version 5.5 in the latter part of the 1980s that object-oriented programming features appeared, eventually implemented as a dialect of Object Pascal for Delphi.
The tale of Object Pascal itself is worthy of note, stemming from Apple's licensing of UCSD Pascal for the Apple II and III. The company developed object-oriented extensions (with input from Wirth) to the Pascal language to support the Macintosh Application Framework, MacApp, before eventually moving away in the direction of C++.
Turbo Pascal for Windows turned up in the 1990s, proving to be a good deal more complicated to make work than Microsoft's Visual BASIC before eventually being sidelined in favour of Delphi, which celebrated its own 25-year milestone this year.
Delphi did much to keep the Pascal flame burning bright in the Windows world for a few more years as programmers seeking something more advanced and faster than Visual BASIC gobbled up Borland's implementation of the language with gusto.
As for Pascal itself, it was eventually displaced by the newfangled C++ as the 1990s progressed, and other vendors provided IDEs that scratched that Turbo Pascal itch. A shame since C++ could be a good deal trickier while not being particularly more performant back in the day.
It is no surprise that, after Delphi, Hejlsberg lead the C# team at Microsoft and became a big noise in the TypeScript world.
Wirth himself moved on to design the Modula, Modula-2 and Oberon languages through the 1970s and 1980s. All would seem familiar to Pascal fans and, like many other languages, can trace their lineage back to ALGOL.
While Pascal's commercial usage has declined – although it can still be found in use as a teaching tool, and there's always Free Pascal and the Lazarus IDE – its influence continues to be felt. The virtual machine beloved by Java fans owes some debt to the work of UCSD Pascal, and the posterior kicking administered by Turbo Pascal and Delphi played no small part in the design of the development tools in use today. And, of course, generations of developers picked up coding at the hands of the language.
If you can find a copy, Niklaus Wirth's Algorithms + Data Structures = Programs is well worth a read for an understanding of the early history of Pascal. As well receiving the Turing Award in 1984, Wirth has also given several interviews and presentations over the years, many of which are well worth a watch.
There are also any number of Pascal compilers out there, but for that full retro feel, Turbo Pascal versions 1.0, 3.02 and 5.5 were designated freeware two decades ago, assuming you can find them and the hardware to make them run.
Delphi also remains available from Embarcadero. ®