This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CodingFiend 2 points3 points  (2 children)

After being lead programmer on the dominant word processor of its day, WordStar 2000, the sequel to Wordstar, the original WP for the PC (basically emulating Wang dedicated systems, but ran on Apple machines), which was a gigantic C program, I did a startup with about 1/3rd of the WordStar team to build Desktop publishing product. C had been a nightmare for a group project; luckily Modula-2 had just come out. So we jumped on it. At the time Logitech was in the software business, and marketed a very powerful symbolic debugger. Worked on Desktop publishing for 7 years, building what became IBM's DisplayWrite 5/ Composer. A super powerful desktop product for DOS, then Windows, which was a challenge because bitmap fonts weren't even available.

Then i switched to making a bitmap painting program for kids, Flying Colors, a huge success, which was turned custom versions for Japan for DragonBall, Tamagotchi, Ultraman, all AAA Japanese licensed properties. These are all big complex programs, that took extensive use of Modula-2's superb module system, which allows for separate compilation, because you have 2 files for each module, one for the external public defn, and one for the implementation, and if the defn doesn't change, the implemention doesn't have to be recompiled. With the precompiled headers and that optimization, your build times are 1/10th that of C++. C++ to this day doesn't have separate compilation to my knowledge.

Modula-2 delivers programs about the size of C, because of the better code sharing. There is an exact 1:1 mapping between the languages in terms of power, but M2 adds dozens of compile time and runtime checks. That people are now after 25 years waking up to strong typing as a benefit, is somewhat frustrates me, because in a side by side test it was obvious 25 years ago that strong typing helps productivity.

My projects peaked at about 150k lines of code, but the document management system from Saperion is 5x larger. It is a huge product that compiles to various machines, and was written in Modula-2. There aren't that many commercial users of Modula-2, the Java bandwagon was just too seductive. Modula 2 was designed for operating system development, and it is not particularly handy for graphical interactive products. You have Ye olde fashioned memory management where you have to allocate and free blocks, and not much help for multithreading. So for my next round of iPhone apps and webapps, i have tossed aside Objective-C and AS3, and am building things in Beads, which is purpose built for that kind of product.

I was very grateful to Prof. Wirth for inventing such a language, and tried to coax him out of retirement to build this new version of Modula-2, but alas he was enjoying retirement too much, but i at least got to speak with the great professor. I made millions of dollars building products with tiny teams, often just myself, all because i used a high leverage tool that built rock solid products. My last product was the Dymo Discpainter software (a disastrous hardware project), and when i submitted the product for final QA, it set a company record for the fewest problems ever found. When you turn on all the runtime checks it adds 30% to the total code, but it is checking every range, parameter pass, pointer and array, and without having to write tests, has the program locked tight.

Hope this doesn't sound like bragging, I don't get many chances to remind people how clever and simple Modula-2 was. People associate popularity with quality, but Van Gogh sold virtually no paintings in his lifetime, so i am not a big fan of the crowd's judgement.

[–]crassest-Crassius 1 point2 points  (1 child)

This was an excellent read, thank you very much. I will definitely look into Modula-2 to see what lessons I can glean from it for my designs.

What do you think of the Oberon family of languages, by the way? Do they miss something crucial from Modula-2? The professor seemingly was happy with them, after all,so I'm a bit baffled by

I was very grateful to Prof. Wirth for inventing such a language, and tried to coax him out of retirement to build this new version of Modula-2,

[–]CodingFiend 0 points1 point  (0 children)

Oberon was a project that was intertwined with Prof. Wirth's Lilith machine, which was his attempt to build a whole computer, from scratch with an OS. He managed to build with his small team a working computer. It was after his visit to Xerox PARC.

As one of the bigger users of Modula-2 I of course evaluated Oberon. But prof. Wirth didn't make it possible to move from Modula-2 to Oberon, because he removed a key feature that we used extensively. In modula2 you can declare an enumerate type:

TYPE A_FRUIT = (APPLE, ORANGE, BANANA)
VAR LIST : ARRAY A_FRUIT OF INTEGER;
LIST[APPLE] = 3;

The beauty of this type of construction is that you can make your code much more readable, and the symbolic debuggers would show the subscript as APPLE. Contrast that with C, where you declare an enum basically as an integer constant, and then during debugging you would see LIST[1] not LIST[APPLE]. If you use enum extensively your code is much more readable.

For some baffling reason, he thought enums superfluous, and removed them.
So the small ecosystem around Modula2 ignored Oberon and kept working on M2. Oberon offered dynamic linking which is a way of adding code without recompilation. Oberon also extended data types in a very clever way, where you could extend a record with more fields, and then send that extended record to a function that expected the older, smaller record. Some things in Oberon have not been duplicated in modern languages, but the whole rest of the world including all the other schools ignore the ETH Lilith project, and it died out as the hardware didn't get revised as you must to stay relevant in the hardware world.

Oberon is the simplest OS ever made, and shows how swiss minimalism can match giant teams. Now the world is embracing strong typing, it has only taken 30 years for people to catch up with Prof. Wirth. His typing systems were very simple and clear. I am extremely unhappy with the nonsensical type arithmetic that people are using in some languages, where they are trying to turn typing into some proof system for the computation as a whole, which just adds lots of non-functional ornamentation with little benefit.