What ever happened to Modula-2?
goto10retro.com
goto10retro.com
It was tough, though, the ST's OS really was written with C in mind. Lots of void pointer action which Wirth languages really didn't get along with.
[0] https://www.cs.purdue.edu/homes/hosking/m3/reference/intro.h...
There was also a brief period pre-Junior when I advocated using C++ with Smalltalk on top. Newton did not have a very linear project history. :)
NS used a simple bytecode interpreter, except toward the end where we had an AOT native compiler you could apply to individual functions (native functions were much larger than bytecode so you had to be selective).
Later hardware had more RAM (up to 4MB in the MP2000) and we might have been able to try some kind of JIT compilation, if the product had survived longer.
It pretty much got me through college, allowing me to balance class schedules and multiple part-time jobs, as well as coordinating a family and tracking my daughter's schedule --- at one point in time I was taking notes in it for Art History (w/ little sketches of each painting/sculpture/building) and faxing them to the secretary for the art department for a learning disabled student --- turned out that that student was then photocopying them for everyone in the dorms to use (this only came out when the professor was asking why everyone's grades were better on average than previous years).
Still kind of sad Apple hasn't made a replacement....
I consider D and C# nowadays the closest languages to Modula-3 in features.
There is still some folks keeping Modula-3 compiler going.
I had used a different flavour of Pascal previously, but Modula-2 felt right. I liked the case sensitivity compared to Pascal's ambivalence. I liked the strong typing with clear differences between signed and unsigned integers. I liked the better block structures that omitted Pascal's "begin" keyword. I liked the way modules were organised.
What happened to Modula-2, in my case, was Turbo Pascal again. I got a job, where we used Turbo Pascal 4. Then 5, and then 5.5 which introduced single inheritance OOP. Then we needed to migrate to this new fangled "Windows 3.1" thing, which at the time we chose C++ and MFC. I stuck with C++ for many years and never went back to Pascal (which evolved into Delphi, successful in its own right).
I think in the broader sense, C++ happened to Modula-2. In the early 90s, C++ was the hot new thing and people were using either that or C. The next shakeup had to wait until Java in the mid 90s.
In the late 80s Turbo Pascal was already at version 5 or 6.
I am still pretty amazed at the size and performance of Pascal-like compilers, and still smile whenever I come across ancient code with Pascal calling conventions, but am also sort of happy I don't have to type BEGIN and END ever again (or brackets--I became a Python and LISP fan).
I have to wonder if there is anything _as good_ from a compiler perspective but with a nicer syntax.
Subjective usability. Objectively, the language is quite usable, and many people even prefer it over the many other choices otherwise available to them.
I'll give you that the lack of extensibility is sometimes a unique frustration among programming languages, but this design choice was intentional, and you've incidentally highlighted that, I think.
I haven’t had a lot of trouble writing some interesting things in Go that I’ve found difficult to redo in C++ with similar simplicity.
Sometimes a language doesn’t need a ton of bells and whistles to be usable.
Wirth understood this and accomplished much.
Consider how we’ve been able to fix Voyager - simplicity can save.
It can be very tedious though, e.g. the way errors are handled.
Kudos to FreePascal folks though.
Mostly Unknown: There was Actually a Turbo Modula-2 (by Martin Odersky for Bordland) https://www.cpcwiki.eu/imgs/6/64/Borland_Turbo_Modula_2.pdf
In the original CISC version of the OS/400, the operating system kernel was mostly written in a PL/I dialect called PL/MP, but parts were also written in Modula 2. As part of the transition to RISC (PowerPC), large parts of kernel code were rewritten in C++ – although a significant quantity of PL/MP survived the rewrite, and a smaller quantity of Modula 2 – and apparently, to this day, some components of the IBM i operating system are still written in Modula 2.
My impression is, they wanted to replace PL/MP with a more mainstream language, and so started rewriting the PL/MP code in Modula 2. However, once it became clear that Modula 2 wasn't taking off, they switched to rewriting it in C++. But, typical "lava layer" anti-pattern, [0] all three of the original, the old rewrite and the new rewrite survive.
[0] https://mikehadlow.blogspot.com/2014/12/the-lava-layer-anti-...
Now we only need a good VSCode plugin for it to be rediscovered by younger generations.
It may still be useful for teaching. Low level enough that you can teach memory allocation, etc. Simple enough that you can cover most of the syntax in an introduction course.
So then do we reuse code that was been scattered around since 1978 and give it new life, or start from zero, yet another language for systems programming with manual memory management, while being safer than C?
Kind of philosophical question.
By the time Modula-2 appeared in the mainstream, «C with classes» (later C++) had already been begot, and it brought about a major change in the industry. Modula-2, on the other, delivered useful, but evolutionary and not revolutionary enhancements to the ageing procedural programming paradigm.
A2 is a pretty neat system. But using it outside the environment it comes with feels a bit crazy! (Same with all Oberon’s I’ve played with)
Sometimes things become over-opinionated to be generally useful perhaps?
I also feel that Active Oberon is the best Oberon that came out from the Oberon linage.
Yes Oberon is like Smalltalk and Lisp Machines, without the environment, it misses a lot.
I actually bought my first ever hard disk (a mighty 10MB as I remember, more storage than I'd ever be able to use), for something like £200, an absolute fortune to an adolescent in 1986, just so that I could install modula-2 permanently in the machine and could stop swapping compiler floppies and program floppies all the time.
But when I first got access to UNIX boxes as a postgrad there was C but no Modula-2, so I switched to C, which could do everything Modula-2 could do except it was a bit more fragile and treacherous.
There was. I bought (and used) it twice back in the day.
It was fast, simple, clean, modular (as you'd expect), and the IDE was the best IDE ever - in relation to its power/performance vs the machines it ran on at the time, obviously, not in absolute terms.
For the Pascal influence you only need to look at the career of Anders Hejlsberg of C# and TypeScript fame. Plus Free Pascal and Lazarus are (arguably) the best modern-day cross platform native desktop software development tools (like an open source cross-platform Delphi).
That is where I heard about the language, and I remember thinking that it seemed good and useful, based on the description, and due to having heavily used and liked Turbo Pascal earlier.
I somehow never got to know there was a Turbo Modula-2, although I did know about Turbo Prolog, and may have tried it out briefly.
That one has several articles, it's the theme of the issue. There are several other issues with Modula-2 articles as well in the Archive, you may find the one you're thinking of if it's not in this issue.
I was just vaguely remembering that there might have been a whole BYTE issue about it, not just an article, like there were whole issues for Lisp and Smalltalk, but was not sure.
Very good to know. Will check those articles out.
Then Borland was deranged, and Microsoft was able to tempt Anders Hejlsberg to the dark side. Their derangement resulted in C++, and eventually .NET, a lose-lose-lose situation.
The wild success of Turbo Pascal was due to it adopting many concepts from Modula (units, most notably), and then the decision of Borland to stick with it rather than doing Modula-2 for brand recognition reasons.
I can't think of any particular reason why Modula-2 is worse than Pascal, though. It's pretty much Pascal with all the necessary bells and whistles to do proper systems programming like C, and a somewhat shorter syntax (thanks to dropping BEGIN).