Live data from Hacker News

Ask HN: Why Did Pascal Fail?

news.ycombinator.com

41–50 of 168 posts

Re: Ask HN: Why Did Pascal Fail?

#41
post #10

Earlier quoted context omitted.

The contents of that post have not been relevant for decades. I would recommend giving Free Pascal a whirl if you haven't. FPC can even compile to JavaScript and it works with WebGL https://github.com/genericptr/Pas2JS-WebGL#pas2js-webgl

> The contents of that post have not been relevant for decades. But decades ago is precisely the timeframe we're talking about here. Pascal lost to C for the reasons Kernighan mentions (among others), which is the question the OP was asking.

You mean features that were actually available in Pascal dialects, during the days when C outside UNIX was based on K&R C dialects like Small-C?

Also considering that most of the complains were fixed in Modula-2, made available initially in 1978.

Re: Ask HN: Why Did Pascal Fail?

#42
post #30

You have to be careful by what you define as "success" and "failure". Many/most languages never really fail, they just become more and more niche. So taking your question to be, why isn't Pascal used as much as some of the other languages from antiquity, like C, sh/bash/ksh/etc, or even Lisp, my opinion is that it was a combination of it being an "old" language and an interpreted language. If you take a look at a tim…

Now wait a minute. If you say that JavaScript is an interpreted language, you would also have to call Java an interpreted language. Do you agree with that?

They both work in exactly the same way. Your source code is compiled to bytecode. That bytecode is then interpreted by a virtual machine. [1] That interpreter may then start a Just In Time compiler (JIT) to compile some of the bytecode down to machine code.

Other than implementation details, both languages work the same way.

Python also works like this, except it does not have the JIT. But it also has a compiler which generates bytecode.

And even if a JIT generates what we fondly call "machine code", that code is interpreted too! What the CPU executes internally looks nothing like the machine code that we see as programmers.

It's interpreters all the way down.

[1] I don't mean in the sense of something like VMware; I'm talking about a software virtual machine that executes an instruction set which we call bytecode.

Re: Ask HN: Why Did Pascal Fail?

#43
post #33

Lack of portability: the 'standard' Pascal was very limited and each implementation added its own incompatible extension. So when a free C compiler was released..

The seems to be an intractable problem. To survive a technology needs to be a commodity, but for a product to succeed the business needs lockin. So there is no growth around standards by people making money off of them.

Re: Ask HN: Why Did Pascal Fail?

#44
post #39

C was faster. It's that simple. Computers were extremely tiny in those days.

Fast where? Borland compilers were basically the same, and if one cared about speed, the only way to achieve it was hand written Assembly.

I don't know if the Pascal code ran slower, but the Borland compilers were plenty fast.

Re: Ask HN: Why Did Pascal Fail?

#45

As someone who started their computer science studies with Pascal and then switched to C (I use C for comparison because it was the dominant programming language in 1990s computer science programs) , I can say that C just offered more to the aspiring software developer. For most people who coded in the 90s Pascal meant Turbo Pascal. While the language itself was great, MS-DOS where it ran not so much. Especially when…

There are so many varied responses here but only ones like this make sense. Unix's language was C. Eventually, windows' API would be C. Then the rest would simply be history.

Surprised there isn't a book on this that explains it.

Re: Ask HN: Why Did Pascal Fail?

#46

C was faster. It's that simple. Computers were extremely tiny in those days.

Pascal was super popular for applications development on the original 68k Macs, Amigas and Atari ST's. I don't know if these machines fall into your "extremely tiny" envelope but we're talking 68000 @ 7 MHz with usually 512K or maybe 1M of RAM.

A little later, Turbo Pascal ran like greased lightning on a 386 or 486 box. There was really nothing else like it, which is partly why it enjoyed such immense popularity.

Re: Ask HN: Why Did Pascal Fail?

#47
post #39

C was faster. It's that simple. Computers were extremely tiny in those days.

Fast where? Borland compilers were basically the same, and if one cared about speed, the only way to achieve it was hand written Assembly.

Speaking of speed, Turbo Pascal's compile speed was lightning fast.

Re: Ask HN: Why Did Pascal Fail?

#48

I used Turbo Pascal a lot as a teenager. Then I switched to Java and never looked back. For me the main reason was garbage collection. String size was limited to 255 (non-Unicode) characters, array size needed to be specified at compile time, everything beyond this required manually allocating and unallocating memory... okay for school projects, but too much work for anything more complicated. The standard library di…

> array size needed to be specified at compile time

This also holds true for C until C99, I think.

Re: Ask HN: Why Did Pascal Fail?

#49
Studying electrical engineering starting 1985 our school used Pascal for first year and then ran with Modula 2 for subsequent years. In those days we were mostly on time share Vaxen, even as EE students only maybe 20% of students had any kind of PC or real computer at home.

As of now I can't remember exactly why, but it seemed obvious to me at the time C was the place to be going forwards, maybe because I was working part time doing embedded design, or I had turbo C and a copy of Microsoft C fell my way, I can't really remember, but I do remember feeling that Pascal and Modula 2 were both a relative dead end when it came to useful skills for future employment.

Re: Ask HN: Why Did Pascal Fail?

#50
post #15

or even nicer was modular 2. But natively, *nix and windows were C bindings, turbo pascal and delphi were the closest for pascal to be popular, but embedded systems also started going C, then C++ came along and OO was supposed to be a magic solution, and object pascal was a late response to the OO phase.

We did some Modula-3 in school, I already knew Pascal well so it drove me nuts with minor differences to trip over.

I doubt looking like Pascal helped these more powerful languages gain popularity.

Post reply on HN