On the Design of Programming Languages (1974) [pdf]
web.cs.ucdavis.edu
web.cs.ucdavis.edu
Designers had ignored both the issue of efficiency and that a language serves the human reader, not just the automatic parser. If a language poses difficulties to parsers, it surely also poses difficulties for the human reader. Many languages would be clearer and cleaner had their designers been forced to use a simple parsing method.
I especially hate those who attempt to design new programming languages today, but then demonstrate a complete lack of awareness about the history of programming languages, by introducing a lot of design errors in their languages, which had been discussed decades ago and for which good solutions had been found at that time, but those solutions were implemented in languages that never reached the popularity of C and its descendants, so only few know about them today.
> as someone who actively studied the field,
Does not compute.
Your comment is mere empty verbiage with no information.
You made a preposterous statement, got called out, and are now making excuses.
Anybody who claims to have studied "Theoretical Computer Science" can/will never make the statements that you did (and that too in a thread to do with Niklaus Wirth's achievements who was one of the most "practical" of "theoretical computer scientists"!).
Here is wikipedia for edification - https://en.wikipedia.org/wiki/Theoretical_computer_science and https://en.wikipedia.org/wiki/Computer_science
I think there are two typical paths to widespread visibility across CS subfields: (1) publishing a widely-adopted textbook, and (2) writing commonly-used software. For example, many computer scientists know about Patterson and Hennessy due to their famous computer architecture textbooks, and many computer scientists know about people like Jeff Dean due to their software.
Reading more academically-oriented literature such as the ACM’s monthly periodical “Communications of the ACM” is also a good way to get acquainted with the latest developments of computer science.
Programming Language Research (categorized by subjects) - https://www.cs.cmu.edu/~mleone/language-research.html
Nevertheless, a useful starting page to begin one's research from.
Somebody needs to create a similar list for current times. Maybe the co-author of "Elements of Programming" and preserver of "Software History" artifacts, named Paul McJones would be the right person? ;-)
We've successfully found some strong patterns for structuring programs that transform data in various ways for the kinds of programs Wirth was imagining. The best patterns have proven themselves by being replicated across languages (for example discriminated unions and pattern matching) and the worst have died away (things like goto and classical inheritance).
There's still work to do to find better languages though. A language is good if it fits the shape of the problem and, while we've found some good patterns for some shapes of problems, there are a lot more problems without good patterns.
I had hoped there'd be more languages for everyday end-user problems by now. At the start of the SaaS era it seemed like a lot of services were specific solutions that might fit into a more general modelling language. That hasn't happened yet but maybe a programming language at just the right level of abstraction could make that possible.
What's so wrong about classical inheritance, and how it died away while being well-supported in most popular programming languages of today (Python, C++, Java, C#, TS, Swift)?
In a sense, it’s like global variables. About every complex program [1] has a few of them, so languages have to support them, but you shouldn’t have too many of them, and people tend to say “don’t use globals”.
[1] some languages such as classical Java made it technically impossible to create them, but you can effectively create one with
class Foo {
public static int bar;
}
If you’re opposed to that, you’ll end up with making that field non-static and introducing a singleton instance of “Foo”, again effectively creating a global.In some Java circles, programmers will also wrap access to that field in getters and setters, and then use annotations to generate those methods, but that doesn’t make such fields non-global.
This I can agree with, but it is far from being "worst pattern". Everything can be like salt.
I think it was more that it would be easy to write a compiler for, which meant that CS students could write one. Don't have a source for this that I can remember, though.
https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gm2
Even available on compiler explorer to play with, https://godbolt.org/z/ev9Pbxn9K
Yes, that was a common trend across all programming languages designed by him.
That is also how P-Code came to be, he didn't want to create a VM for Pascal, rather the goal was to make porting easier, by requiring only a basic P-Code interpreter, it was very easy to port Pascal, a design approach he kept for Modula-2 (M-Code) and Oberon (Slim binaries).
I have never been able to determine whether Wirth knew of this work, but, given that Richards's 1969 BCPL paper described OCode, I suspect he was aware of it, and that it influenced his design of the Pascal-P compiler. (I am not sure when Intcode appeared, but it was present when I obtained the BCPL compiler in 1972, a year before the Pascal-P release.)
Would you mind posting links to the relevant papers?
https://beckassets.blob.core.windows.net/product/readingsamp...
And there's the chapter 7 in the Richard's book (1979): https://archive.org/details/richards1979bcpl/page/n131/mode/...
You will find much more information and references at the software preservation site.
Your last link (BCPL history) contains links to a lot of papers (all?) by Martin Richards one of which is (pdf) INTCODE - An Interpretive Machine Code for BCPL which i presume was what "vincent-manis" was referring to in addition to the other papers on BCPL Language/Compiler/Manuals. Seems quite comprehensive, i must say.
We really need to publicize all of Martin Richards' contributions to computer science. He seems to be one of those unsung heroes mentioned everywhere having contributed to Languages/Compilers/VMs/OSes but not that well-known.
From the site;
BCPL—the language and systems built with it—connects the first few generations of computer scientists and software engineers, spanning mainframes to minis to micros. It was driven from the UK, but with a tributary into the heart of US research institutions, where it begat C, the most popular systems programming language of all time.
If fact there were all operating systems written with such ideas like Burroughs B5000 in 1961, nowadays still sold by Unisys, and thanks to this approach being easily retargeted to modern hardware.
Why this "who did it first thread?" in first place?
Regarding the popular opinion here that Pascal was created for educational purposes (only) - implicitly meaning not for building real, large-scale software - Wirth considered these two characteristics equivalent, and in his view one was a necessary condition for the other.
From the summary/abstract of his original publication about Pascal (The Programming Language Pascal) written in 1970 and published in Acta Informatica in 1971:
In view of its intended usage both as a convenient basis to teach programming and as an efficient tool to write large programs, emphasis was placed on keeping the number of fundamental concepts reasonably small, on a simple and systematic language structure, and on efficient implementability.
1. To use it in teaching a structure programming course to new students. As in the late 60's all student programming was batch mode (submit your program to an operator to run, and pick up the printout the following day), this meant the compiler had to be single-pass and give good error messages.
2. To use it in teaching a data structures course involving new data structures worked out by Wirth and Hoare.
3. To use it in teaching a compilers course. This meant the compiler code had to be clean and understandable. Being single-pass helped in this.
for (i = 1; i <= 100; i++) {
S;
if (P) {
break;
}
}
are just as bad since `break' (and `continue' and early `return') are a just gotos in disguise.Gotos get a bad rep because they become spaghetti when misused. But there are lots of cases where using gotos (or break/continue/early return/catch) makes your code cleaner and simpler.
Part of a programmer's job is to reason about code. By creating black and white rules like "avoid gotos", we attempt to outsource the thinking required of us out to some religious statement. We shouldn't do that.
Gotos can be useful and can lead to good code. They can also be dangerous and lead to bad code. But no "rule of thumb" or "programming principle" will save you from bad code.
(FWIW, this is essentially the argument that Knuth makes in his defense of goto paper)