Earlier quoted context omitted.
C had `malloc` and (real) pointers pretty much from day 1, and allows you to treat the result of `malloc` as an array. Pascal's `new` did not let you do this, as I recall (it didn't even allow you to allocate a chunk of memory of arbitrary size... meaning that you can write `malloc` in C, but you can't write `new` in Pascal -- edit: before someone starts jumping on me with the claim that "Golly-Gee-Whiz Pascal '92" l…
Surely there was a way in Pascal to execute system calls (which would give you access to malloc-like constructs)?
Ask HN: Why Did Pascal Fail?
151–160 of 168 posts
Re: Ask HN: Why Did Pascal Fail?
#152Earlier quoted context omitted.
> I'm not sure Pascal entirely lost due to just C. Borland's Turbo Pascal was quite popular Look at which one is being used to this day to write essentially every modern operating system, and even the interpreters and compilers for other languages. JavaScript engines are written in C, not Pascal. I think it obviously did lose, though judging from the moderation it clearly still has some fanatical followers. Both Turb…
> JavaScript engines are written in C, not Pascal. Which one? Unless you forgot to type ++.
In any case, it's not inc(Pascal), now, is it?
Re: Ask HN: Why Did Pascal Fail?
#153Earlier quoted context omitted.
Only if one only looks to the original Pascal language as means to sell their propaganda. All Pascal dialects, and the Extended Pascal standard that improved the original one, had the array of construct that allows you to query for the actual bounds. Type conversations were also available, again in all dialects. Naturally, those variants were ignored, as Kernighan had a message to sell.
Kernighan wrote that in 1981. As late as 1988, I was (unwillingly) using an original, non-extended Pascal. Those were still out there, still being used. And, all Pascal dialects had some construct. They had different constructs. If you wanted to be portable, you couldn't use any of them (until the Extended standard came out). Kernighan notes those extensions, but does not accept them as a solution because of their no…
Kernighan wrote that paper after writing "Software Tools In Pascal", and finding it considerably harder than it should have been to write that kind of thing in Pascal. (The predecessor book, "Software Tools", was written in RATFOR, and Pascal should have been miles better to write software in.)
In this book, they (Kernighan and Plaugher) tried to write code that would work in Pascal, not just in one dialect of it. That is, portability was essential to the code they were writing for the book. That may have lead to a greater emphasis on portability in Kernighan's paper than one might think warranted by the general situation.
Re: Ask HN: Why Did Pascal Fail?
#154Earlier quoted context omitted.
It still is. According to TIOBE (yes, I know it's not reliable) Pascal is currently more popular than Rust, F#, Cobol, Lua, Nim, etc.
If we didn't already know it was not reliable, this alone would suffice to demontrate it. Citing TIOBE is like saying you're OK because anyway your mother loves you.
Re: Ask HN: Why Did Pascal Fail?
#155You 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…
Pascal is generally not an interpreted language. It is a compiled language that is suitable for systems and applications programming.
For some reason, Pascal sat in my mind as an interpreted language. Maybe my whole arguments falls apart then.
Re: Ask HN: Why Did Pascal Fail?
#156Re: Ask HN: Why Did Pascal Fail?
#157Object Pascal is a hybrid language, having an even tighter relationship to Pascal than does C++ to C. You can easily write it without using OOP or classes (or newer things like generics), so that it closely resembles the ISO 1983 or 1990 Pascal.
Pascal is still widely used (categorized as a top 15 to 20 language). That it is not as popular as certain corporate backed C family languages (C# or Java), doesn't mean failure. Saying Pascal "failed", is very deceptive language or arguably having an agenda. That would be like saying Go, Rust, or Swift "failed" because they aren't as popular as C# or Java (with the big corporate money behind it). Keep in mind that Object Pascal is as or more popular than those languages.
Object Pascal was created and used by Apple in the 80s and 90s (used for OS and app development). They preferred Object Pascal over C (does that mean C "failed"). The reason Apple dropped Object Pascal years later for a combination of C++ and Objective-C was partly because they moved from the Motorola 68000 chips to IBM's PowerPC and partly because Symantec's (Think Pascal) and Metrowerks (CodeWarrior) Object Pascal products had beat Apple's Macintosh Programmer's Workshop Pascal compiler in the market. As part of a series of consolidation and strategic moves, Apple moved on to Project Builder IDE that was developed by NeXT (who they bought) and began preferring Objective-C (does that mean C++ "failed"). After the move to PowerPC, a lot of Mac developers were using Metrowerks Object Pascal compiler (CodeWarrior) to port and develop applications. Borland's Turbo Pascal joined the party for a time, but was more successful on Windows. Use of CodeWarrior's Pascal compiler for Macs continued until around 2000 or so.
Object Pascal was used in IDEs and compilers by many companies in the 80s and 90s, among them is Borland (then later to Embarcadero) which shipped Turbo Pascal and Delphi (both very successful well known products) and it was quite popular in the 90s and early 2000s. During this time period, Pascal and then Delphi (the name of the IDE using Object Pascal) was often rated between 1 to 10 in language popularity. Many would say that is success.
Arguably the reduction in use and popularity comes from mishandling by Borland, who got way too greedy, and started charging extravagant prices beyond anything normal people could afford. They abandoned their common user base for enterprise customers, along with getting into an all out corporate war with Microsoft (who appears to have been trying to get rid of competitors on their OS going against Visual Basic and used for app development). This battle concluded with Microsoft picking off Borland's top engineers (including Anders Hejlsberg, who created C#), and Borland being bought by Embarcadero. However, years later, things have "stabilized" with Embarcadero releasing a free Community Edition of Delphi. Along with Free Pascal/Lazarus (a compiler originally written with Turbo Pascal by the way in 1997) slowly becoming more well known, to include Oxygene (Rem Object's Pascal IDE) and PascalABC (numerous YouTube videos in Russian on it) also starting to appear more on the common radar.
Delphi (has academic licenses) and Turbo Pascal (which is freeware now) was and is still used for teaching students their first programming language in various schools, depending on country. PascalABC (open-source) has been taught in Russian schools since the early 2000s. Free Pascal/Lazarus (open-source) has also been popping up in various school systems around the world as well.
Object Pascal has many dialects. Most notable: Delphi (Embarcadero), Oxygene (Rem Objects), Smart Pascal (transpiles to JavaScript), Free Pascal/Lazarus (open-source), PascalABC (open-source and .NET), and DWScript (open-source).
Re: Ask HN: Why Did Pascal Fail?
#158Earlier quoted context omitted.
Before that, there was a time when "most of the limitations of the language" had not been addressed. I had the misfortune to have to program in the language in that time, and it was painful. Part of the reason C took over the world and Pascal did not is that, in this time, C was much less annoying to use than Pascal. Borland fixed that, and brought Pascal to parity with C. (Maybe even ahead of C, because Pascal had b…
> Kernighan's "Why Pascal Is Not My Favorite Programming Language" https://www.lysator.liu.se/c/bwk-on-pascal.html There is a TL;DR at the end.
It is bizarre or demonstrates a lack of knowledge to take a document from 40 years ago, and then pretend nothing changed. People wouldn't do that with C or C++, so why do it to Pascal/Object Pascal?
Take a look at the below link, Which addresses most points outlined in the paper, in terms of modern dialects of Pascal.
https://wiki.freepascal.org/Why_Pascal_is_Not_My_Favorite_Pr...
Something else to be said about Kernighan and that "hit piece" paper, was that AT&T Bell Laboratories was behind it. People should realize that AT&T was pushing C and then C++, so were very much trying to take down Pascal. This is a document that was "weaponized" to be used against competition, and very oddly, is still being used as such.
Re: Ask HN: Why Did Pascal Fail?
#159Pascal 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...
It is also weird to put Pascal into a box, as if the language is not allowed to evolve/change. C and C++ is not the same language that it was 20 years ago. Doesn't make sense to have this expectation for Pascal.
In addition, you can't gloss over that the different dialects of Pascal addressed issues. For those that program with Pascal, these differences are often minor or considered a plus. You can choose the dialect that best suits your needs.
Many would say that it is unfair to bring up Kernighan's 40 year old paper (from 1981). Things in the Pascal world changed almost immediately after it was published.
Turbo Pascal came out in 1983, and addressed various issues. Then Apple created Object Pascal in 1986, addressing even more. Then came Delphi (1995) and Free Pascal/Lazarus (1997).
Take a look at the below link, Which addresses most points outlined in the paper, in terms of modern dialects of Pascal/Object Pascal.
https://wiki.freepascal.org/Why_Pascal_is_Not_My_Favorite_Pr...
Arguably, Kernighan created a "hit piece" paper for AT&T Bell Laboratories (they are on the document).
AT&T was pushing C and then C++, so were very much trying to take down Pascal. This is a document that was "weaponized" to be used against competition, and very strangely, it still being used as such when most of the points presented are no longer relevant.
Re: Ask HN: Why Did Pascal Fail?
#160I wouldn't say Pascal completely "failed". e.g. Delphi was quite popular at some point.
Pascal was crowded out of its niche by Delphi. It could have been supplanted by Modula-2, instead, or Oberon, UCSD Pascal, Object Pascal, Apollo Pascal, or any number of other languages with syntactic similarities to Pascal. But it wasn't. Pascal was displaced by K&R C for mainstream work, which was soon supplanted by C90. C90 has been displaced from serious development work by various C++ versions, although it hangs…
Object Pascal is an extension of Pascal, that adds OOP. It is much tighter than the relationship of C to C++. You can write Object Pascal procedurally, where it closely resembles ISO 1983 or 1990 Pascal.
By the way, there was a 1993 technical committee to add OOP to Pascal, which a lot comes from the various Object Pascal dialects. Be that as it may, the Borland/Embarcadero Object Pascal became the de facto standard. The other dialects of Object Pascal follows them.
To say nobody uses Pascal/Object Pascal is disingenuous. Clearly people use and pay for Delphi (Embarcadero), Oxygene (Rem Objects), and Smart Pascal. Free Pascal/Lazarus and PascalABC are open-source projects with over 20 year histories, so they are not going anywhere, and are very much used.