Top
Best
New

Posted by susam 4/13/2025

Why Pascal is not my favorite programming language (1981) [pdf](doc.cat-v.org)
71 points | 87 commentspage 3
igtztorrero 4/13/2025|
The 80s war between C and Pascal, has been resolved, each side gave its arguments, the judge of history has decided that the clear winner was C.

The new battle has begun with three major contenders: C, Golang, and Rust. Which one will be chosen for the future?

CRConrad 4/16/2025||
Yeah, looking back at history, the wrong side often won.
Sunspark 4/13/2025||
It won't be C. The reason as I see it is because of commodification. Executives want things as cheap and drop-in as possible. With C, you need a certain amount of skill. With a language like Rust that advertises memory-safety, they like that because it means you don't need as much skill anymore.

A similar thing is happening with game engines. If everyone is taught Unreal engine then you don't get in-house engines anymore which requires skill, because it's easier and cheaper to get some replaceable grunt to implement it in Unreal, perhaps with some off-the-shelf assets, which is perceived as "good enough".

It will be interesting to see how AI generation of code changes development tooling and the skills required.

froh 4/13/2025||
> With C, you need a certain amount of skill. With a language like Rust that advertises memory-safety, they like that because it means you don't need as much skill anymore.

this is a surprising statement --- in tust you need to formalize the flow of mutability, which is a skill requirement.

so why do you think rust for the boss seems cheaper than C?

Sunspark 4/14/2025||
I can't give you a non-speculative answer because in truth, my coding is from the Pascal era.

The way I look at it in terms of cheaper is that you don't need to be as careful, less need to worry about memory leaks which lead to exploits, etc. I.e. you don't have to track every little thing yourself.

Starting to make inroads with larger projects now.. Firefox's audio subsystem is in Rust, while Chromium's is C++ (w/ tools to help detect leaks).

mcv 4/13/2025||
My first thought when reading the title was: because you're not living in the 1980s anymore. But it's an article from 1981, so it's got to be something else.
xyproto 4/13/2025||
Note that Pascal of 1981 is not the same as Object Pascal compiled with FPC in 2025, although many of his points still stand.
pjmlp 4/14/2025|
And the issues were already sorted out in Modula-2 from 1978, Pascal's replacement as per its inventor.
ddgflorida 4/14/2025||
For me Pascal was an awesome language in the 1980s. Oracle PL/SQL reminds me of it.
pjmlp 4/14/2025|
PL/SQL is based on Ada, hence the similarity.
rini17 4/13/2025|
Heh so it seems because the Pascal arrays and strings were so atrocious, Mr.Kernighan avoided them completely in C. Everyone is supposed to roll their own, with quite disastrous consequences.
WalterBright 4/13/2025||
Everyone tries to roll their own strings in C, and eventually give it up, because the 0-terminated strings are so deeply embedded in the language and the library.

Even D still has a nod to C strings in it, in that string literals like "abc" have a 0 appended to them that is not included in the array length. "abc" can implicitly convert to a char*, which makes it very convenient when calling printf.

duskwuff 4/13/2025||
On the other hand: having your standard string type limited to 255 characters - requiring a completely different set of functions to manipulate longer ones - is painful in its own way.

(You can avoid some of the pain by using a big-endian length, and converting immutable Str64K pointers to Str255 by taking a pointer to the second byte of the length. But that's a terrible hack.)

pjmlp 4/13/2025||
Only if stuck in standard Pascal, as Pascal evolution, Modula-2 had already fixed that by 1978.

Whereas by the time Turbo Pascal for Windows came to be, that was also sorted out in Object Pascal according to Borland linage.

As evolution to Modula-2, following up on Pascal evolution, Oberon had it sorted out as well in 1990.

int_19h 4/13/2025|||
The problem of the original standard Pascal is that you couldn't roll your own strings in it, because it didn't have pointer arithmetics or heap-allocated variable-length arrays, at all.
dtgriscom 4/13/2025||
I was using Pascal to program Mac apps in the late '80s. I was forever finding myself wanting a string, but having an array of characters. What a pain.