
Why Pascal Is Not My Favorite Programming Language (1981) [pdf] - kick
http://doc.cat-v.org/bell_labs/why_pascal/why_pascal_is_not_my_favorite_language.pdf
======
SideburnsOfDoom
I used to encounter this article _all the time_ in the late 1990s as an
argument against Borland Delphi, which was by far the most widely used Pascal
variant then.

You can reply point by point about how it is factually wrong about Delphi:

e.g.

> There is no break statement for exiting loops.

Delphi has a "break" statement. (1)

> case statement ... there is no default clause

Yes there is, the "else" case. (2)

Many of these "extended syntax" features were likely added due to the
criticisms in this paper. So in one sense the paper was valuable in causing
that, in another sense it's usefulness was over by the late 1990s.

And then the eventual fallback argument is: "Ok, then Delphi is not Pascal"
which was technically true, but then this article is allowed to stand as "an
argument against Pascal (not Delphi)"

... and is soon picked up again as an argument against Delphi (because it's
"Pascal" ).

Round and round it went. So tiresome and ignorant.

1)
[http://www.delphibasics.co.uk/RTL.asp?Name=Break](http://www.delphibasics.co.uk/RTL.asp?Name=Break)

2)
[http://www.delphibasics.co.uk/RTL.asp?Name=Case](http://www.delphibasics.co.uk/RTL.asp?Name=Case)

~~~
mseepgood
> And then the eventual fallback argument is: "Ok, then Delphi is not Pascal"
> which was technically true, but then this article is allowed to stand as "an
> argument against Pascal (not Delphi)"

It wasn't even true for Turbo Pascal before Delphi.

------
pjmlp
The historical rant against Pascal, where only ISO Pascal is taken into
consideration lest not weaken the argumentation, most of the negative issues
regarding strings, open arrays, pointer usage and procedure/function pointers
were sorted out by UCSD Pascal, Turbo Pascal, Object Pascal (at Apple and
later Borland) and ISO Pascal was later reviewed into ISO Extended Pascal.

~~~
kragen
Yes, they each sorted them out. (I'd mention VMS Pascal, too.) But they sorted
them out differently, so if you were, for example, writing _Software Tools in
Pascal_ , as Kernighan had, you couldn't use their solutions; they were
incompatible from one system to the next. ISO Extended Pascal did not solve
this problem even when it was published in 1991, _ten years after_ this paper,
because even today it's not universally supported; for example, FreePascal
still doesn't support it.

In a few cases, like TeX and _STiP_ , the solution was to write in standard
Wirth and Jensen Pascal, despite the inconveniences. Most people instead
resigned themselves to writing nonportable code.

By the way, I see that the comment window has closed, but I'm still interested
in your thoughts on
[https://news.ycombinator.com/item?id=22083468](https://news.ycombinator.com/item?id=22083468)
— it represented a fair bit of effort on my part, and it's disappointing that
you haven't answered at all.

~~~
pjmlp
Yeah that is the other typical argument, where it gets "forgotten" that
outside UNIX in 1981, C was equally non-portable with dialects of K&R C
everywhere like Small-C, RatC and plenty of others, taking yet another 10+
years for a standard to come up and respective compilers to catch up with it.

~~~
AnimalMuppet
So? Does that make anything kragen said untrue? This is just whataboutism,
only on technical rather than political topic.

[Edit: On reflection, you're addressing a different topic. The question the
rest of us are talking about is "was Pascal that bad?". And the answer is,
"yes".

You want to talk about something else - Pascal vs. C. But in C, you could at
least do "#ifdef Compiler_A" to achieve "portability". Yeah, it's not very
good portability, but you could get to one source file that would compile with
different compilers. For Pascal, so far as I know, you couldn't do even that
much.]

------
tpmx
Turbo Pascal 6.0 was a fantastic programming environment for DOS. The inline
assembler feature (the "asm" statement) was awesome! It allowed you to build
demo scene-quality effects for the VGA while doing most of the grunt-work in
high-level Pascal. This is why e.g Fast Tracker, Crystal Dreams II (Triton)
and Second Reality (Future Crew) were all built in a combination of Turbo
Pascal and inline asm.

IIRC Turbo Pascal 7.0 (aka Borland Pascal 7.0; I never unstood the difference)
added syntax highlighting but mostly focused on adding Windows support (meh).

I wrote my first web apps as BP7 win-cgi apps back in 1995.

~~~
pjmlp
Windows support was added in Turbo Pascal for Windows.

Turbo products were the "community/student", while the Borland were the
"professional" variant with more tooling and compiler optimisations.

~~~
tpmx
> Windows support was added in Turbo Pascal for Windows.

I think Turbo Pascal for Windows was like a branch, but then TP7/BP7 brought
it into the mainline. Just before the mainline was reworked into what became
Delphi.

~~~
pjmlp
Not sure about the timeline anymore, just that I bought TPW shortly after it
came out.

~~~
tpmx
Me neither, it was a long time ago.

------
aequitas
My programmer career started in my teenage years when my uncle lend me a book
about programming serial/parallel ports on an IBM compatible PC. The book
would explain a certain concept and then give different code examples in two
languages BASIC and Pascal. However the variable names in the Pascal examples
where in German, those from BASIC where in English. My teenage self therefore
thinking Pascal was a 'German' programming language so I stuck with the BASIC
examples, learning programming was complex enough without having to learn
German as well. Only later in school when I got lessons in Pascal it struck me
it was just as English as BASIC.

------
Jemm
I miss pascal. It was a language that was easy to read, unlike C.

~~~
unnouinceput
And who's stopping you to write things in Pascal these days? Lazarus + Free
Pascal has plenty of platforms as target. Heck you can run Lazarus on
Raspberry Pi and create stuff for Rasbian right there on your RPi device.

~~~
gmfawcett
There's also Ada, which is not the same language but which was heavily
influenced by Pascal.

------
musicale
Wirth's languages are beautiful even if C-like languages won the syntax war
for the most part.

Nonetheless Pascal-like languages have had some moderate success over some 40+
years from original Pascal to Turbo Pascal to Object Pascal to Delphi (not to
mention many other languages from Ada to VHDL.)

Wirth's Oberon ecosystem is also beautiful and uses Pascal-like languages to
describe everything from his RISC CPU (specified in Lola) up to entire
operating system and user environment (written in Oberon.)

Personally I enjoy reading Pascal/Delphi/Modula-3/Oberon code, and I'm
fascinated by the Oberon system as an example of how things can be small yet
also clear and capable.

------
xet7
That is about historical Pascal that existed at 1981. I don't know does that
Pascal version run on current computers anymore.

Nowadays there is FreePascal and Lazarus, that support many platforms and have
a lot of features.

------
BadThink6655321
Of all the nails that could be used to seal Pascal’s coffin, the one I use is
that I can’t write ‘writeln’ in Pascal. Other than that, it was great in it’s
time (mid 70’s for me).

~~~
pjmlp
How do you write malloc() and exit() in C?

You don't, it has to be in Assembly or calling underlying OS APIs.

So also a nail in C's coffin.

~~~
danmg
malloc: Have a big static block of uint8_t and return pointers from it.

exit: longjmp.

~~~
pjmlp
Funny, malloc() implemented that way is UB and doesn't work in all cases,
specially when passing pointers around dynamic loaded libraries or threads.

So exit() gets to call longjmp() which definitely can only be done in
Assembly, back to step 1.

~~~
danmg
Isn't this how malloc was done on classic MacOS?

~~~
pjmlp
Classic MacOS was written in a mix of Assembly and Apple Pascal.

C was a guest language via MPW, and plugged into those APIs.

------
mamcx
The damage this viewpoint was _massive_.

Pascal could have been our present, but now we live the mistake of base so
much on top of C/C++, and because we never learn, repeat with JS.

~~~
AnimalMuppet
This _viewpoint_? Listen, I've had the misfortune to work in a non-enhanced
(Jensen & Wirth-ish) Pascal, and what this article says is _true_. And it's
true that the problems describe get in your way, sometimes annoyingly, and
sometimes really badly.

The damage to Pascal was from _Pascal_ , not this paper or the viewpoint it
represents.

(I'm not going to defend JS, though...)

~~~
mamcx
> to work in a non-enhanced

That is like to work in first generation C.

But the viewpoint cause massive damage: Pascal get a reputation based in the
first version with a limited scope, despite have very good points at his
favor.

In a modern example, is like dismiss GO because lack of generics and verbose
error handling, and consider C better for some OTHER reasons, that is what
actually happened with pascal and other langs.

ie: Happens ofter that some critize lang/tool for X (could be truth) ignore Y
(that is a good point) and still choose Z (for other reasons).

In the case of C: Is more popular, can I do funky things with pointers, my OS
is made on that.

~~~
AnimalMuppet
I worked in C just before and just after my gig in Pascal. While C had flaws,
it was a more usable language than Pascal. First version C, first version
Pascal. That's what Pascal apologists never want to admit. They still, 50
years later, either don't understand it or won't accept it: _C was more usable
than Pascal._ Pascal's story may have been better, it's theory may have been
better, but when it came to actual ability to write programs, C was better.

Now, Pascal improved. Various versions fixed various flaws in various
nonstandard ways. But the same was true of C.

------
rsecora
Link for previous discussion (2014)

[https://news.ycombinator.com/item?id=8260694](https://news.ycombinator.com/item?id=8260694)

~~~
man2525
Based on the earlier discussion, I have to wonder why C requires forward
declarations if it's using a compiler that performs 4 passes and has
dependency checking that even other languages defer (and compile) to. Is it
standardization?

