4 ms·
Wirth Evolution
- microtherion 4y agoI think the author meant this to be a bit tongue in cheek, but if one were to take this seriously, there would be much to criticize about the approach. One big concern I'd have, for instance, is to rely on the standards as reflecting Wirth's state of mind in the design of a language. This is a questionable idea for almost any programming language, as the standard represents an endpoint in the design process, rather than the starting point. It's even more questionable for Wirth designed languages, as he was not very involved in the standardization efforts. By the time Pascal was standardized, he had moved on to Modula-2 which he thought had superior solutions to many of the design flaws in Pascal, so he had little use for standardized Pascal. Furthermore, the languages themselves had quite a bit of evolution over their lifetimes. Wirth and his team were very involved in systems design and compiler construction, Wirth was a big advocate for simplicity, and that philosophy included co-evolving the programming language along with the system. Every now and then he decided that some particular feature was more trouble to implement in a new compiler than it really was worth in practice, so he simply changed the language spec.
- pmcjones 4y agoWirth designed two languages before Pascal: EULER and Algol W.
- vincent-manis 4y agoActually, it was Wirth and C.A.R. Hoare who did Algol W. (“A Contribution to the Development of ALGOL”, CACM June 1966). Decades ago, I did a fair bit of programming in Algol W, it was quite pleasant.
- rep_lodsb 4y agoIt's called a procedural language for a reason :) Something that doesn't return a value shouldn't be called a "function", that's just a C-ism. And curly braces are ugly! </troll> Integers, enums and chars are all so-called "ordinal" types. They have consecutive values with a lower and upper bound, that's why they can all be used as array indexes or in sets (floating-point numbers can't, nor could enums with gaps, if they existed). Ranges aren't used just for array bounds. I think it's really elegant how the usual "0 .. len-1" is actually an anonymous subtype of integer, not some special syntax for declaring arrays.
- Zickzack 4y ago> Something that doesn't return a value shouldn't be called a "function", that's just a C-ism. Something that does not seem to return a value returns in fact a value of the type void which is empty. The idea comes from Algol 68 and has been a contribution by a certain John McCarthy.
- mananaysiempre 4y agoAhh I finally get why C calls the unit / top type “void”—it’s empty as in requires no storage! (It’s not the usual empty / bottom / contradiction type, which has an empty set of possible values and would imply the function does not return at all.)
- todd8 4y agoPL360, Algol W, and EULER are additional languages created by Wirth. PL360 was a programming language that provided low level access to IBM's 360 mainframe hardware, Algol W made a number of improvements to Algol 60 to make it more practical--I think it was a reaction to Algol 68 which was very complex for the time and consequently ended up with very few compilers[1]. I don't know anything about Euler. I had the pleasure of meeting Nicklaus Wirth around 1977 at Texas Instruments. I worked in a department that had developed a PASCAL compiler for TI processors; Wirth had been invited to give us a demonstration of his Pascal/Modula based system. I don't remember the details of the impressive presentation, but I do remember him telling the joke about his name: in Europe they call him by name (sounds like "Virt") while Americans call him by value saying "Worth" for his last name. I enjoyed his books a great deal and read every published paper of his that I could get my hands on. I learned a great deal from his clear writing during formative years in my programming career. --- below this line, I stray off topic --- [1] For example, the Algol 68 Report used a two-level grammar (Van Wijngaarden grammar) to describe the syntax of Algol 68. Such a two level grammar had one set of rules that would expand into an arbitrarily large different set of productions describing the syntax of an Algol 68 program. Vw grammars are capable of defining recursively enumerable languages. In the Algol 68 report it was hoped that more language features could be precisely described by such a formal grammar rather than by prose that stated requirements like "variable must be declared before use". While admirable, such a goal isn't practical because the set of recursively enumerable languages is essentially equivalent to the set of Turing machine programs or Chomsky's type 0 grammars. We don't want compilers to be burdened with solving the impossible to solve halting problem.
- Zickzack 4y agoAs always, the off topic invitation cannot be passed. The two-level grammar of Algol 68 gave the semantics of Algol 68 in a denotational language, the second level. As such, it is not more complicated as other languages with defined semantics, such as in the ML family. To my knowledge, people used that second level to implement a real virtual (ho hum) machine, resulting in a working interpreter. However, the ML aficionados can be surprised with the information that their language was not first one with fully defined semantics. Algol 68 was ahead of its time. As for Pascal, history as I know says that Wirth invented Pascal as a training language for a course in which a one pass compiler was to be built. Only later, when the Algol 68 project became complicated, Wirth started to market it as a superior design - something which it never has been. And yes, I enjoyed Turbo Pascal.
- Joker_vD 4y ago> "Such a module is called a monitor…” Not a mutex? It literally has the words “mutual exclusion” in it. Is this where Java’s bogus synchronization comes from? > Can’t really blame him, literally nobody knew how to do multithreading well before Rust. Even in 2013 your choices were limited to “Erlang” and “suffering”. And in 1978 I’m not sure that anyone even had done enough multiprogramming for practical concerns like that to come up. To borrow from the author himself, "omg it's adorable". Per Brinch Hansen invented, named, and implemented this "monitor" concept in 1968 or somewhen about that time and published it in his 1973 book "Operating System Principles" (C.A.R. Hoare would popularize this concept further in his 1974 paper "Monitors: An Operating System Structuring Concept"). This book also describes RC 4000 operating system which, by the way, inspired the whole microkernel research in the 70-ies and 80-ies. By 1978, the same Hansen guy has published another book, "The Architecture of Concurrent Programs", in which he describes both a new language, Concurrent Pascal, and a new microkernel OS called "Solo", implemented entirely in Concurrent Pascal. So believe it or not, people did know how to do multithreading stuff way before Rust has graced us all with its existence.
- mikewarot 4y ago>All of these languages follow the same block syntax style designed for quite dumb one-pass compilers. Recursive descent single pass compilers are an elegant and damned fast tools. I've always had compiles that just happen in a blink. As I pick up more C projects, I know it's going to suck waiting for compiles.