There were dozens of us!, using M2. I used it on Amiga. It was sort of ironic. I wanted to use C - I guess. But this was pre-internet, pre-university, pre-city. The nearest people to network C with, were cows on the neighbours farm - there weren't any.. I had two C compilers, but no text or people to tell me that you needed to link, what linking was, and in particular, the commandline arguments to do so..
In this world, modula-2 was a godsend. It had a clear type system, clear type definitions, readable error messages, and logical/intuitive tooling, which meant a school kid could figure out how to operate it by themselves. So for a couple of years, I would replicate in M2,what others did in C. I eventually met an environment where I could learn C, but modula2 allowed me to start early.
Circa 1990 we seriously considered doing Newton OS in Modula-3 [0], which had all the things…modules, generics, exceptions, GC, etc. But we ended up taking a chance on C++ (in the form of CFront). Modula-3 was very cool, though.
This was before we switched to ARM. We would have had to make a compiler/runtime for the AT&T Hobbit processor (or get DEC interested in doing it). (Hmm, maybe this was 1989 not 1990.)
Dylan (then known as Ralph) started with the acquisition of Coral Software, a year or two after the big language search. We started building the kernel in C++ then, and later the “Junior” project (i.e., the one that finally shipped) did the whole thing in C++ with NewtonScript on top.
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. :)
Thanks. Just found this paper: https://dl.acm.org/doi/pdf/10.1145/217838.217844.
Very interesting. Why didn't Dylan and Smalltalk make it, i.e. in which respect was NewtonScript better? Was the latter natively compiled or interpreted?
The MessagePad hardware was pretty limited. There was 128kB of RAM, of which NewtonScript got to use about half. But there was 4MB of ROM. So the ability to leave objects in ROM was very important. Most (all?) other languages including Dylan and Smalltalk assume objects all reside in RAM and are mutable. The prototype inheritance system is what made this work, as described in that paper.
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.
Please accept my thanks to you and the rest of the team --- my Newton MessagePad 110 was one of my most favourite tools--- could you please convince Apple to make an iPhone which supports an Apple Pencil?
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....
Back in the late 80s, the first "real" compiler I had was Logitech Modula-2 (yes, they used to sell stuff other than mice). Even then, Turbo Pascal 3 felt like a toy. Modula-2 was the real thing. And it was slow! Granted that was on an 80286, but the compiler was slow. (The generated code was fine.)
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.
I learned Modula-2 in college 30+ years ago (hot on the heels of Pascal, which I used for Mac development), and actually sort of liked it, but C was king across VAXen and UNIXes, so I went that way and never looked back.
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.
In my opinion Go is the most Pascal like language that exists today due to fast compilation speed and extremely opinionated pursuit of oversimplifying the language at the detriment of usability.
> extremely opinionated pursuit of oversimplifying the language at the detriment of usability.
Subjective usability. Objectively, the language is quite usable, and many people even prefer it over the many other choices otherwise available to them.
Go has the nice quality (shared with Pascal) that it pretty much sticks to being a set of computer instructions, which means when you read Go it's easy to understand more or less exactly what the computer is doing. Great for auditing. Not so great for building large systems as abstractions over types.
"Not so great for building large systems that are hard to audit due to the level of type abstraction they have access to."
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 sort of like Go, but also can't bring myself to write it that often. I don't know why--although part if it is fetching libraries directly from git repos.
IBM used Modula 2 to write parts of OS/400, the operating system of the IBM AS/400 – nowadays the operating system has been renamed to IBM i, (in part) since it now runs on identical POWER hardware to AIX. (At first, when they moved to RISC, they shared CPUs with the RS/6000 but had their own servers with incompatible firmware, only later did they unify the server lines and firmware so the same servers could run either operating system.)
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.
Given that Zig is basically Modula-2 features packaged in C like syntax + compile time execution, or languages like Odin do exist, there is still a group that finds such kind of languages interesting.
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?
As an undergraduate I had to use Modula-2 in the first year programming courses. It was a decent language for teaching programming, but I don't recall anybody who liked it. Those in systems programming quickly switched to C the next year.
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.
That's fair. I taught myself to program using C, and C's conflation of pointer parameters with arrays, and its declaration syntax, confused me at first. And I also ended up with more unexplained glitches segfaults in the beginning due to arrays not being bounds checked. It might have been easier to start with something like Modula-2 in the beginning.
I would ascribe it to the paradigm shift – C++ was the executor, but the advent of the object-oriented programming was the instigator.
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.
JPI Modula-2 was my first proper compiler on my childhood PC! I loved it, it was nicer to use than either Turbo Pascal or C.
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.
> If memory serves, JPI did a Modula2 compiler that looked quite a bit like Turbo Pascal.
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).
Ah ha, I knew I had a “turbo” modula-2 but remembered it wasn’t actually Borland, but couldn’t remember anything else about so didn’t know what to google right now. Thanks for digging it up!
IIRC, there was a BYTE magazine article about Modula-2 once, maybe written by Dick Pountain, a regular BYTE columnist from the UK.
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.
My 1994 freshman Intro to Compsci was a Modula-2 course, and seeing it here for the first time in 30 years has reminded me of what acute anxiety feels like :) That class scared me right into the humanities for a few years.
The commercial PC/DOS compiler was a terrible buggy mess. I had the misfortune to use TopSpeed Modula-2 and it involved going into the compiled code with a Hex Editor and re-assembling it.
Pascal was an amazing simplification of ALGOL, but then Wirth went too far, and Modula-2 was worse, not better, as the wild success of Turbo Pascal showed.
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.
It's very much arguable whether Pascal was simpler than ALGOL 60 (of which it is a derivative via ALGOL-W), given that it has a much more complicated type system. I mean, A60 didn't even have pointers and records. The only thing I can think of that it did have but Pascal did not is pass-by-name and labels as values.
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).
You mean C#, right? C++ (and MS's adoption of it) predated Hejlsberg's move to MS by quite a bit. He worked first on J++ (for which MS got sued) and then C#.