[HN Gopher] What ever happened to Modula-2?
___________________________________________________________________
What ever happened to Modula-2?
Author : thunderbong
Score : 38 points
Date : 2024-05-18 12:32 UTC (1 days ago)
(HTM) web link (www.goto10retro.com)
(TXT) w3m dump (www.goto10retro.com)
| OnlyMortal wrote:
| If memory serves, JPI did a Modula2 compiler that looked quite a
| bit like Turbo Pascal.
|
| http://www.edm2.com/index.php/TopSpeed_Modula-2
| kcartlidge wrote:
| > _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).
| olliej wrote:
| 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!
| jll29 wrote:
| Modula-2: The Book https://www.modula2.org/downloads/wirth-
| modula2/Wirth_Modula...
|
| 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
| polotics wrote:
| is it just me or does this website not copy the Metafilter theme?
| randcraw wrote:
| Isn't the answer to that question ISO/Object Pascal? Modulas 2
| and 3 had too little inertia along pretty much the same path as
| OP to outcompete it.
| WillAdams wrote:
| I thought the answer would have been Oberon:
|
| https://projectoberon.net/
| esafak wrote:
| It lives on in nim.
| kombine wrote:
| And D.
| pjmlp wrote:
| Nowadays available as a standard GCC fronted, since GCC 13.
|
| Now we only need a good VSCode plugin for it to be rediscovered
| by younger generations.
| trealira wrote:
| But nowadays, why would anyone use Modula-2 today and not Rust,
| C++, Go, or basically any other programming language?
| phicoh wrote:
| 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.
| trealira wrote:
| 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.
| fifticon wrote:
| 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.
| cmrdporcupine wrote:
| Yep, this was me with the Atari ST.
|
| 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.
| ghewgill wrote:
| 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.
| Narishma wrote:
| > Even then, Turbo Pascal 3 felt like a toy.
|
| In the late 80s Turbo Pascal was already at version 5 or 6.
| ghewgill wrote:
| Closer to mid-80s then. I started using Modula-2 in earnest
| around 1986 give or take a year.
| rcarmo wrote:
| 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.
| densh wrote:
| 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.
| akira2501 wrote:
| > 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.
| bitwize wrote:
| 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.
| butterisgood wrote:
| If it's not usable, why is there so much useful software
| written in Go?
|
| 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.
| WalterBright wrote:
| C++ killed it. One of the compiler writers for it ruefully told
| me that they backed the wrong horse, that I was right in picking
| C++ to do.
| Rochus wrote:
| C++ is much more powerful; but C++ could have added modules
| thirty years earlier.
| wrs wrote:
| 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.
|
| [0]
| https://www.cs.purdue.edu/homes/hosking/m3/reference/intro.h...
| johnaspden wrote:
| 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 PS200, 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.
| mikewarot wrote:
| 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.
| billforsternz wrote:
| C# not C++ I think
| Jtsummers wrote:
| 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#.
| threecheese wrote:
| 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.
| skissane wrote:
| 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.
|
| [0] https://mikehadlow.blogspot.com/2014/12/the-lava-layer-
| anti-...
| butterisgood wrote:
| I'd like Active Oberon to be more broadly applicable.
|
| 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?
___________________________________________________________________
(page generated 2024-05-19 23:00 UTC)