9

In reading this blog post about Photoshop 1.0 I was surprised to learn that it was written in Pascal (Object Pascal to be exact). But you never hear about Pascal anymore. Why is that?

8
  • 3
    Which implementation (answering this is part of the problem)? Also Why Pascal is Not My Favorite Programming Language is a good read on the subject.
    – user40980
    May 8 '13 at 18:34
  • 4
    The penultimate paragraph of Why...: Because the language is so impotent, it must be extended. But each group extends Pascal in its own direction, to make it look like whatever language they really want. Extensions for separate compilation, Fortran-like COMMON, string data types, internal static variables, initialization, octal numbers, bit operators, etc., all add to the utility of the language for one group, but destroy its portability to others.
    – user40980
    May 8 '13 at 18:37
  • 2
    bwk's paper is very, very out of date (and was so at least 15 years ago). It's a nice bit of history, but it has no relevance to modern Pascals. May 8 '13 at 21:03
  • 1
    @MichaelT: "Why Pascal Is Not My Favorite Programming Language" was more a marketing document than anything truly useful. Bear in mind that the guy who wrote it was also the author of the definitive guide to C programming, and thus had a direct financial incentive to tear down the competition rather than be objective about it. May 8 '13 at 21:38
  • 1
    @MasonWheeler certainly. One need only look at the acknowledgments and the list of books that he is referencing of his own works. That said, the motives don't invalidate the arguments made (just that the opinions and language used needs to be taken with a grain of salt and understood in context).
    – user40980
    May 8 '13 at 21:40
8

In a word: Fragmentation. Delphi and TurboPascal took a lot of the users and set them on their own paths. Then there's the official ISO standard (more like a couple) vs what the original author considers the standard. The mainframe crowd and the PC crowd didn't agree what was what. Nobody really wants to learn 5 different languages to get things done. One true unified language being standard helps a lot. Instead of making Pascal better, the offshoots became competitors to the original.

8
  • Not to forget Delphi's horrible framework forced developers to stick with that compiler even as the framework got worse with each update.
    – Reactgular
    May 8 '13 at 21:25
  • 2
    @MathewFoscarini: Which horrible framework are you talking about? The one that was so well-designed that Microsoft blatantly used it as the template for the .NET framework? May 8 '13 at 21:31
  • Was it called OWL by Borland? It was horrible because it branded Pascal applications with UI elements so that everyone would know you used Borland's stuff to make it.
    – Reactgular
    May 8 '13 at 21:42
  • 2
    @MathewFoscarini: OWL was never part of Delphi. It was part of the late Turbo Pascal line, and it got abandoned when Delphi came out, in favor of the VCL. (Which used Object Pascal wrappers around native Windows controls, so your program had a standard Windows look and feel.) May 8 '13 at 21:45
  • 1
    @MasonWheeler: .NET was designed by one the core developers of Turbo Pascal / Borland Pascal / Delphi. Framework design is a matter of taste. The fact that if the same person designs two frameworks with the same purpose, those frameworks tend to be similar, is just natural and certainly not "blatant". May 9 '13 at 4:25
5

A teaching language

Pascal started its life as a programming language for teaching. It was carefully crafted to get people started and gently tugg them onto the right way: structured programming. And the language as such if compared to "Your-father's-C" is much gentler to the novice than C. I think its actually quite amazing that Pascal caught on as it did. I think it is worthwhile to have a look at Algol 68 http://en.wikipedia.org/wiki/ALGOL_68 to get an idea how other languages at the time looked like that were considered to be advanced.

The original Pascal had to be extended in order to "scale" for greater projects (i.e. no notion of modules/units, etc.). Implementations extended Pascal to acommodate the needs of application development. As mentioned: by Philip this lead to fragmentation.

While fragmentation happend to C as well, the real issue with Pascal is, that it was never unified in the same way as C has been. Niklaus Wirth, the creator of Pascal started to develop successor languages (Modula, Oberon) which was probably not the best marketing choice.

Still with Delphi, Pascal had retained a lot of popularity throughout the years, especially as a better alternative to Visual Basic 6. Over the time however support faded and now I think one can only speculate. I think that people considered it on a "professional" scale somewhere between C (and emerging C++) and Visual Basic. With Java and .NET emerging the whole programming language landscape shifted. Lots of projects were probably migrated to Java and the .NET platform eventually and the community lost its drive. That might be the real issue, once lots people "leave the ship" it gets hard for a platform to stay relevant.

Pascal was not so bad after all as some people remember it. Pascal compilers were really fast back then, because Wirth had done a really fine job at grammar definition, it is easily parseable.

Aging with grace

In the long run Pascal has aged with grace before disappearing from stage. It does look outdated from today's perspective but overall it has been a success story.

A lot of comparisons about its success highlight things that it lacks in comparison to C, however I feel like that with new high level languages emerging, it was actually too close to C, and the world was not big enough for both of them. Today, there is not viable alternative to C/C++ while scripting languages are created by the dozens.

2
  • 1
    Pascal hasn't disappeared from the stage at all; it's just evolved. Today it's best known as Delphi, which is still going strong. May 8 '13 at 21:39
  • Delphi has lost its momentum. It still might be a good platform but it has lost a lot of ground while being vendor locked-in. I kind of liked freepascal
    – wirrbel
    May 26 '13 at 12:57
2

On the Mac, at least, C, C++, and especially OOP happened to Pascal. The original Macintosh Toolbox API was specified using Pascal interfaces and calling conventions, and Pascal was the language of choice for early Mac programmers. C arrived on the platform fairly early, and Pascal and C coexisted for a number of years while programmers on each side argued about which language was better. Compiler vendors (Apple, Think/Symantec, and later metrowerks) provided compilers for Pascal, C, and C++, often in a single product. At the same time, the benefits of object oriented programming were becoming obvious. Apple's OOP framework was MacApp, written in Object Pascal, and this was surely the framework used to build the first versions of Photoshop (and many other important products). As C++ gained popularity and other OO frameworks appeared written in C++ (Think Class Library from Symantec, followed later by PowerPlant from metrowerks) Apple gave in and rewrote MacApp in C++. That was pretty much the end of Pascal in regular use on the Mac, save for maintaining older code.

Not the answer you're looking for? Browse other questions tagged or ask your own question.