Live data from Hacker News

Ask HN: Why Did Pascal Fail?

news.ycombinator.com

61–70 of 168 posts

Re: Ask HN: Why Did Pascal Fail?

#61
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…

Compilers actively translate code into a representation understandable by the machine.

It just so happens that the “machine” is an abstraction of a CPU.

Interpreted Javascript doesn’t fit this bill. If compiled to web assembly then it would.

Re: Ask HN: Why Did Pascal Fail?

#62
> Why did Pascal fade instead of growing?

Poor brand management —

"This was, of course, partially of Wirth's own making". … "He refrained from ... names such as Pascal-2, Pascal+, Pascal 2000, but instead opted for Modula and Oberon".

"Pascal and its Successors" 2002

https://www.swissdelphicenter.ch/en/niklauswirth.php

Re: Ask HN: Why Did Pascal Fail?

#63
I can tell you which ridiculous reason I chose to switch to C++ after I'd learnt C++: begin and end felt less "elite" than {}... I was 12 at the time, don't judge.

Still... when I see Lua, Visual Basic or Julia even now I think: this is not going to make it, it doesn't stroke the programmers ego. I'll be happy to be proven wrong.

Re: Ask HN: Why Did Pascal Fail?

#64

Earlier quoted context omitted.

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…

Compilers actively translate code into a representation understandable by the machine. It just so happens that the “machine” is an abstraction of a CPU. Interpreted Javascript doesn’t fit this bill. If compiled to web assembly then it would.

V8 compiles all JavaScript it executes to machine code. There is no interpreter included in v8.

Re: Ask HN: Why Did Pascal Fail?

#65
Pascal had problems that kept users from doing anything useful with it. Real-world implementations included bypasses for the problems, but then they weren't really implementing Pascal any more. Kernighan's famous article "Why Pascal Is Not My Favorite Programming Language" explains more:

http://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pasc...

Re: Ask HN: Why Did Pascal Fail?

#66
post #40

Earlier quoted context omitted.

UNIX propaganda that was already out of date when it was published.

I always think it ironic that the C order of variable declaration prevailed for so many years (C++, C#, Java) yet in recent times several newer languages have discovered that the Pascal declaration order is handy for compiler type inference. var age : integer; pascal var age int - Go var age : int - Swift var age = 52; - Dart var age: Int = 10 Kotlin

Indeed, it is some kind of sweet revenge that most modern languages have reverted back to Pascal style of programming.

Re: Ask HN: Why Did Pascal Fail?

#67
Pascal was the teaching language in the early 80s. I had compilers available for the IBM 370 (VM/CMS), the VAX (VMS) and even cross-compilers for bare metal MC68000 and PDP/11. Early Macintosh development used Pascal (though it wouldn't run on the earliest Macs) It wasn't ideal for every use, and Prof. Wirth, an academic, basically left extending the language to the compiler vendors.

Now I'm teaching freshman software engineering students and we use Python. I personally like it but some of it is pretty idiosyncratic. It's going to be a more difficult transition from Python to compiled languages like C/C++ than it was for Pascal. The big difference is Python is used in the industry, so knowing it is worth more than knowing Pascal back in the day.

Re: Ask HN: Why Did Pascal Fail?

#68
post #40

Earlier quoted context omitted.

UNIX propaganda that was already out of date when it was published.

I always think it ironic that the C order of variable declaration prevailed for so many years (C++, C#, Java) yet in recent times several newer languages have discovered that the Pascal declaration order is handy for compiler type inference. var age : integer; pascal var age int - Go var age : int - Swift var age = 52; - Dart var age: Int = 10 Kotlin

While I appreciate the increased readability, I kind of like C being economical, in that it does not need all those pesky 'var', 'fn', etc. (On the other hand, I think C creators may have gone a bit too far with this when they decided that overloading the keyword 'static' was a good idea.)

Re: Ask HN: Why Did Pascal Fail?

#70
post #68

Earlier quoted context omitted.

I always think it ironic that the C order of variable declaration prevailed for so many years (C++, C#, Java) yet in recent times several newer languages have discovered that the Pascal declaration order is handy for compiler type inference. var age : integer; pascal var age int - Go var age : int - Swift var age = 52; - Dart var age: Int = 10 Kotlin

While I appreciate the increased readability, I kind of like C being economical, in that it does not need all those pesky 'var', 'fn', etc. (On the other hand, I think C creators may have gone a bit too far with this when they decided that overloading the keyword 'static' was a good idea.)

It is so complex that people came up with tooling to actually understand when some devs go wild,

https://cdecl.org/

Also the main reason behind the religous war in C++ of west const versus east const.

Microsoft now got a couple of top devs on their C++ team that are on east const, so while we have about 25 years of Microsoft documentation, code samples and libraries using west const, the C++/WinRT team is now pushing for east const everywhere.

Post reply on HN