Posted by susam 4 days ago
Why Pascal Is Not My Favorite Programming Language - https://news.ycombinator.com/item?id=37044792 - Aug 2023 (2 comments)
Why Pascal Is Not My Favorite Programming Language (1981) [pdf] - https://news.ycombinator.com/item?id=22222117 - Feb 2020 (62 comments)
Why Pascal Is Not My Favorite Programming Language (1981) - https://news.ycombinator.com/item?id=19221143 - Feb 2019 (55 comments)
Why Pascal Is Not My Favorite Programming Language – Current Status - https://news.ycombinator.com/item?id=8273608 - Sept 2014 (1 comment)
Why Pascal is Not My Favorite Programming Language (1981) - https://news.ycombinator.com/item?id=8260694 - Sept 2014 (64 comments)
The thing we are still trying to add back into C, 50 years later.
Many, who don't study or know of the history, can get sucked into the rhetoric of C as the "superior language" versus the reality of it being a heavily corporate pushed language. Pascal was in the way, so got hammered by bad press. Same sort of thing happens today, in these weird programming language scuffles. Rust, Zig, Vlang, Dlang, Odin, C3, etc... If a competitor is in the way, strange one-sided and highly critical blogs can materialize.
By 1987, pretty much any of Kernighan's criticisms involving Pascal and derivatives were moot. But he never retracted or modified what he got wrong or had changed. He had many years to do so. That was before the 2nd edition of his book (The C programming language in 1988). And before ANSI C (1989). Turbo Pascal and Object Pascal were out, which both took lessons from Modula-2, and were widely known successes.
http://lambda-the-ultimate.org/classic/message4322.html#4671
"People who are still trying to refer to the article are unaware of the capabilities of current Pascal (Delphi/FPC) implementations."
https://wiki.freepascal.org/Why_Pascal_is_Not_My_Favorite_Pr...
"From the point of view of software engineering, the rapid spread of C represented a great leap backward. It revealed that the community at large had hardly grasped the true meaning of the term “high-level language” which became an ill-understood buzzword."
Source: Niklaus Wirth, A Brief History of Software Engineering, 2008 (https://people.inf.ethz.ch/wirth/Miscellaneous/IEEE-Annals.p...)
Here is C.A.R Hoare's on his "The 1980 ACM Turing Award Lecture", guess to what programming language he is indirectly making a point of, regarding 1980 language designers and users have not learned this lesson.
"A consequence of this principle is that every occurrence of every subscript of every subscripted variable was on every occasion checked at run time against both the upper and the lower declared bounds of the array. Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interests of efficiency on production runs. Unanimously, they urged us not to--they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980 language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law."
"Software Fault Prevention by Language Choice: Why C is Not My Favorite Language"
https://people.eecs.berkeley.edu/~fateman/papers/software.pd...
- Java, C, C++, C#, Kotlin, Rust, Swift, Go, TypeScript, JavaScript, ... → they look more or less the same
Compare with these ones that didn't catch on as much as the ones above:
- ML/Haskell, Erlang, Elixir, APL, Common Lisp (and other Lisps), Lua, Pascal, Delphi, BASIC, Visual Basic, VBA, VBScript, SmallTalk,... → each one bringing something refreshingly new to the PL design space
The timeline of 70s and 80s also doesn't really seem to fit with what you're saying either. Of the languages you mention either as "more or less the same" or "refreshingly new", the ones from either the 70s or 80s are C, C++, ML, Smalltalk, Pascal, and Smalltalk; all of the other "refreshingly new" ones are from either before or after those years. Common Lisp was from the 80s, but the syntax originated with LISP in the 50s, so if you're going to go with the most common variant, I'd argue you should also remove ML from the list and replace it with OCaml, which is from the 90s.
Even more significantly, it feels like you're comparing apples and oranges with the discussion of syntax at the beginning and then talking about bringing something new to the PL design space after. I'd guess that most people involved in PL design find syntax to be the least interesting aspect of it, and I think it's hard to argue that none of the languages you described as looking similar brought anything new to the PL design space.
Another counterexample to consider is Python. It's quite unlike Algol, but that certainly hasn't stopped it from becoming popular.
* As opposed to BEGIN-END in SQL, indenting in Python or weirdness of Cobol in the 90s.
>- Java, C, C++, C#, Kotlin, Rust, Swift, Go, TypeScript, JavaScript, ... → they look more or less the same
The upside being that if you come from C or Java you will fill at home with Go.
In my 30-something years of programming (admittedly my first programs were toy-like Pascal pieces of code), I saw only one improvement in this Algol-like style that I considered major: named arguments. Their use improves code readability, at least for me.
Nowadays it's all Javascript and more specifically Typescript in my case.
That PDF would be probably much longer about Javascript but it seems Kernighan is quite okay with that language nowadays https://www.youtube.com/watch?v=AB60_uUetJs
http://literateprogramming.com/
WEB is expressive enough that there is a tool to directly transpile to C for compiling:
Lack of external static storage class, the pinnacle of C programming.
Lack of oh so powerful C strings, terminating in zero (hopefully).
"There is no way to override the type mechanism when necessary, nothing analogous to the "cast" mechanism in C."
"begin" and "end" are bulky compared to { and }.
>Lack of external static storage class, the pinnacle of C programming.
>Lack of oh so powerful C strings, terminating in zero (hopefully).
>"There is no way to override the type mechanism when necessary, nothing analogous to the "cast" mechanism in C."
>"begin" and "end" are bulky compared to { and }.
In my opinion these are some of the less significant arguments. Your post never stated that it contains merely a subset a subset and instead claims to refute or weaken the overall proposal. I agree with the previous poster that this is a form of lying.
For instance, you ignored one of the very first and most significant points, "The size of an array is part of its type" which means that " it makes it difficult indeed to create a library of routines for doing common, general-purpose operations like sorting"
Incidentally, those are examples of quotes i.e. verbatim excerpts from the article.
Also, the problem with pascal string was the length being limited to 255 characters, which wasn't enough even at the time.
I wonder how the non-programmers succeed to write commas correctly, because those follow the same logic: e.g. "red, green, blue". In author's opinion, I guess it should be "red, green, blue," instead.
Usually they don't.