Ah, Modula-3, one of my perennial favorites. Definitely a different continuation of Modula-2 than Wirth's own Oberon. Agree on the tooling issues. If it would've "sold" better, so many languages of the last two decades could've been avoided.
The languages Oberon and Oberon-2 were explicitly designed for the task of creating the operating system Oberon. When Wirth started working on the OS he realized that it would be too hard to write a nice OS with just Modula-2 (at least that's what I understood from the interviews he gave with various journals). Modula-3 was an evolution of Modula-2 by DEC (not by Wirth), but it was influenced by Oberon and they all belong to the same "Pascal language family" in terms of design philosophy.
I think it's very natural to mention Modula-3 in the context of Oberon.
Sure, Active Oberon is pretty advanced, and Modula-3 had all sorts of things, including generics — but to my knowledge Wirth was not directly in those languages (or with Zonnon or Component Pascal), and he was unhappy with their complexity. (He apparently prefers the entire language's grammar to fit on a single screen.)
Modula-3 is not directly related to Modula-2, despite what many think.
Modula-2 was designed by Niklaus Wirth, influenced by Mesa, and the XDE environment after his first sabbatical at Xerox PARC. Oberon would be out of his second sabbatical, influenced by Mesa/Cedar.
Modula-3 on the other hand, was born out of research at DEC/Olivetti from Mesa/Cedar former researchers, after they came out with Modula-2+, as Cedar's evolution influenced by Modula-2 design.
What is the state of Modula-2 in 2022? Has the language been developed over the years, or is it basically the same as in the 1990s? Any good references?
We used Modula-2 and later Modula 3 in the University, and I've dabbled with Oberon. Oberon is still very magical and amazing
> The module concept of Oberon's predecessor Modula-2 is still unrivalled today
The module concept of Oberon is also very good (leaner than Modula's). There are also other languages with good module concepts, e.g. Ada, or the CLR based languages.
> Wirth's book Compilerbau ... is a piece of pristine clarity
For a certain type of compiler (rarely used today).
> Modula-2 is really just Pascal with modules, which was welcome
My impression is that Modula was "just Pascal with modules", and Modula-2 is "Pascal with modules and coroutines". (At risk of dramatic over-simplification.)
Secondarily, the existence of Modula-2+ and Modula-3 (from 3rd parties) and then Wirth himself moving on to Oberon suggests that while Modula/Modula-2 were not quite there yet, Oberon was at least a lot closer.
Although the relative plethora of Oberon variants (Oberon, Oberon-07, Oberon 2, Active Oberon, etc.) suggests that maybe it was still not quite fully evolved.
I do wonder if, rather than competing implementations and variants, it would be possible to re-unify them under one standard, in the way that Common Lisp managed to do... even if it were not something quite as minimal and elegant as Prof Wirth would endorse.
What did you think about Modula-3? I like how it had much of what a C++ programmer might want in a cleaner, safer, faster-to-compile way. Most Modula and Oberon derived languages had little to no undefined behavior outside the Unsafe modules. All were used to write OS's & other low-level code. Optional GC where it was tolerable. IIRC, Modula-3 also had verification done on its standard modules to catch certain errors.
Some of the design attributes might be worth resurrecting in another project. Minus the capitalized keywords. :)
Wirth himself moving on to Oberon suggests that while Modula/Modula-2 were not quite there yet
Well...that depends on your perspective, and Wirth had a particular one. Wirth was an academic, and mostly confined his real interests to academic topics rather than 'real world' programming concerns (not to say he was unaware of them). In particular, his interest in compilers resulted in languages that are generally straightforward to write decent compilers for, rather than appeal to every programmer PLT wishlist. That gets you things like "I/O is an exercise left to the student". So, yes, Wirth moved on from languages when he felt there was something more interesting to explore. Oberon has been described as an exercise in how much syntax can be take out of a programming language, for example (at risk of dramatic over-simplification), because that sort of minimalism became a research interest to Wirth.
On the other hand, I personally think the existence of so many useful variant/extended Pascals and Modulas (and decedents like Ada & VHDL) means that lots of people thought they were good 'bones' that just needed to be fleshed out to move from academic to commercial use. That's not uncommon from stuff that starts out in universities. YMMV.
It is worth re-posting this, and re-reading Wirth's works every couple of years. The module concept of Oberon's predecessor Modula-2 is still unrivalled today: .def modules that specify the interface and that can be compiled separately from their .mod implementations, which may not even exist when a client application can already be coded against the compiled interface in a type-safe way.
Also, Wirth's book Compilerbau (in German, not sure if it was translated) is a piece of pristine clarity; at just ~100 pages in pocket paperback form, everyone reading it immediately feels writing a compiler or byte-code interpreter is simple and they can do it.
Modula and Oberon do not vaguely look like Wirth lanugages, they are Wirth languages. And unlike Pascal, which was designed mainly for educational purposes, Modula and Oberon were designed for real world usage.
My mistake, I'm not intimately familiar with it. From what I can tell, Modula-2 and Oberon-2 were both extensions, though, to be used as successors to the previous language.
reply