9 ms·
Modula2 was such an underappreciated language. If it had a C like syntax it would probably have been successful.
by eterps 4y ago
Modula2 was such an underappreciated language. If it had a C like syntax it would probably have been successful.
- pjmlp 4y agoWhat helped C was exactly the same as what made JavaScript sucessful, it came with a free beer platform (UNIX). Modula-2 never had such support, the syntax was never such a big issue, there were even IDEs with auto formating for uppercase. Additionally on the PC front Turbo Pascal offered most relevant Modula-2 as extensions, thus reducing the interest. Great that it lives on GCC.
- eterps 4y agoYeah agreed, it is great that it lives on as part of GCC.
- poulpy123 4y agoWasn't Unix proprietary and very expensive at the time ?
- pjmlp 4y agoNo, AT&T was forbidden by law to take advantage of Bell Labs work commercially, hence why UNIX spread into universities, the famous lions book came to be[0], and tapes with source code where shared with a license cost that was symbolic versus the 1970's mainsframe OSes. When this situation changed during the mid-80's, AT&T was rather quick to sue Berkley university regarding BSD, forbid the further publishing of the lions book (which kept being widespread via black market copies), however by the time these events took place the influence of UNIX and C across the industry was already quite visible. [0] - https://warsus.github.io/lions-/ https://warsus.github.io/lions-/
- kjs3 4y agoAll of that is true (still have my n-th generation Lions photocopy someplace), but Modula-2 was early '80s (1982?). By that timeframe you had lots of folks shipping commercial Version 7 or System III variants (e.g. Unisoft, ISC, Microsoft (Xenix), Venix, Amdahl, Sun), with System V based systems just around the corner. These generally were, as the OP said, "proprietary and very expensive". I recall we still got a sweetheart deal on university licensing from AT&T (usually obtained only because it was required to get a 4BSD distribution tape from UCB...we won't discuss the 3B20s), but commercial shops were charged real cash. Or did I miss your point?
- pjmlp 4y agoModula-2 was 1978 actually, and those systems were still a couple of years away as you mention. And even when they came to be, the real money they were charging (while licensing for peanuts the original source code) was still quite cheap versus paying for what the competition was asking for, hence why long term UNIX wiped out most of them, with IBM and Unisys mainframes/micros being the last standing survivors.
- msla 4y ago> What helped C was exactly the same as what made JavaScript sucessful, it came with a free beer platform (UNIX). Your saying that reminds me of this: https://utcc.utoronto.ca/~cks/space/blog/programming/CTriumph https://utcc.utoronto.ca/~cks/space/blog/programming/CTriump... > This significantly understates the real appeal of C at the time, even and especially to people who had alternative languages. A great illustration of this is C on the early Macintosh. You see, unlike environments like MS-DOS (which had no language associated with it, just assembler), the early Macintosh systems already had a programming language; they were designed to be programmed in Pascal (and the Mac ROMs were originally written in Pascal before being converted to assembler). > This was more than just an issue of Apple's suggested language being Pascal instead of C. The entire Mac API was designed around Pascal calling conventions and various Pascal data structures; it really was a Pascal API. Programming a Mac in C involved basically swimming upstream against this API, full of dealing with things like non-C strings (if I remember right, Mac ROM strings were one byte length plus data). [snip] > Despite all of this, C crushed Pascal to become by far the dominant programming language on the Macintosh. [snip] C was enough better to displace Pascal in a hostile environment. > C did not win just because it was at the right place at the right time. C won in significant part because it was (and is) a genuinely good language for the job it does. As a result it was the language that a lot of pragmatic people picked if you gave them anything like a choice. UNIX and C certainly helped each other spread (UNIX helped C because if you wanted UNIX, you got C; C helped UNIX because porting an OS which isn't a few thousand kilobytes of assembly is easier than porting one which is) but C could spread just fine without UNIX going along with it.
- pjmlp 4y agoThat is all good and well, except what crushed Object Pascal on Mac OS was C++, with App Toolbox C++ port and Metrowerks PowerPlant, hardly anyone was doing anything that serious with C instead of C++ on the Mac. Newton OS (after Dylan lost to C++ on Newton), Taligent, and Copland were also written in C++. Whereas on the PC world, C was mostly used to port UNIX stuff, and being the low level underpinings of Windows and OS/2, while application software made use of OWL, MFC, CSet++,... Hence why BeOS also went down the C++ path instead of C. In a way it is kind of ironic, as C++ was also born as a UNIX language, adopted by major desktop OS vendors, although many mistakenly assume Microsoft was the main cause for its adoption.
- AnimalMuppet 4y agoThe free beer platform almost certainly helped with universities and hobbyists. It enabled free (as in beer) software - that doesn't work quite the same if you have to pay hundreds for the compiler. But your narrative doesn't explain why C took over commercial software. Why was Windows written in C? It wasn't because Microsoft could get the compiler for free.
- pjmlp 4y agoBecause Microsoft was also a UNIX vendor, actually used Xenix in the context of MS-DOS development (via downlink cables) and already had knowledge in-house?
- eterps 4y agoOh, not just that. It should also have been called Pascal-2 or Pascal++. It would have been a world of difference, marketing matters
- kjs3 4y agoThere was already a relatively popular compiler called Pascal-2 back in the day from Oregon Software. It was a heavily extended Pascal for the PDP-11 and some other contemporary platforms. I doubt that would have stopped Wirth from calling it that if he wanted to, but it was called Modula-2 instead for other reasons.
- mhd 4y agoBack when Modula-2 came out, that wasn't as much an issue as it is today, where BCPL family style is just seen as "normal". Pascal being seen as normal, and Modula-2 not having that much an unique selling point beyond that. Sure, modules are great, but several Pascals already had C-like separate compilation and then Units came around (UCSD?) and established themselves. I think co-routines were the other big difference, and most people didn't really know what to do with that. Still don't. I mean, it's not like nobody tried. There was a time where you both had Modula-2 implementations available and units weren't done. Borland had a Modula compiler and only introduced Units with TP 4. On big machines, Ada stole a lot of the thunder. Somwhere I've got a "Software Engineering in Modula-2 and Ada"from that age to cover all your bases. And then C++ went big, and here we are… Note that I'm very happy that this is now so universally available and will definitely write a few things in Modula-2 next year.
- pdw 4y agoPortability between different compilers was a problem. People complain about C's portability, but at least you can rely on `fopen` existing. The best that Modula-2 offered was a semi-standard InOut module that provided stdin/stdout functionality (no files). Eventually a real standard library was added by the ISO standard, but that was published about 10 years too late to have an impact.
- HarHarVeryFunny 4y agoI used Modula-2 at Acorn c.1982 (did some development for PANOS), as well as being half of the Acorn team that developed the Acorn ISO Pascal system. I have to say that to me both languages - straight-up standard (not extended) Pascal and Modula-2 suck! Modula-2 is really just Pascal with modules, which was welcome, but even the ISO Pascal standard mentioned the "external" directive as a common extension to support separate compilation which is 3/4 the benefit of modules (the other 1/4 being the module namespace). Extended versions of both languages such as Borland Turbo Pascal or TopSpeed Modula-2 were great, but it rather damning that the only way to make a language really useful is to extend it ! C, which was around at the same time, was always a much more useful language.
- jksmith 4y agoAgreed TSM2 was a sweet effort, and that green thread traffic light demo was fun to play with.
- kcartlidge 4y agoLoved that demo. Still have the code for it. TopSpeed Modula-2 was superb, so much so that even as a college student I bought it - twice, because I damaged the first one.
- lproven 4y ago[Author/submitter here] > 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.
- tangus 4y agoI don't think so. Wirth languages are generally not appreciated because they are short sighted. They guy designs a language with only one goal: to build a compiler that runs in the machine he's currently working on. * This system has a way to run programs where I need to specify the program name and the files it'll work on? Ok, that goes into the language: `program X (input, output)` * I need a couple of variadic functions? Why bother creating a protocol for them? Let's put the ones I need into the language. * I need to format numbers in these couple of functions? No need to write a library function for that; that would force me to create a variable string type, which I don't need. No, I'll add a special parameter syntax just for these functions into the language. Etc., etc. Somebody needs to come and works hard in making a Wirth language usable for general programming before they can be appreciated.
- pjmlp 4y agoAh, just like a couple of dudes made a language that targeted only PDP-11, and then suffered lots of extensions until it was standardized about 15 years later?
- AnimalMuppet 4y agoThe "extending" was an order of magnitude less intrusive with C than it was with Pascal. With C, you wrote a new function that wasn't part of the AT&T distribution, which was a perfectly normal thing to do. With Pascal, you had to change the language definition, which probably meant changing the compiler.
- pjmlp 4y agoForgetting about everything else besides bare bones terminal output? I have some 1980's books with lots of extending and dialects like RatC.
- AnimalMuppet 4y ago> Forgetting about everything else besides bare bones terminal output? No. You could write things that were not "bare bones terminal output" as functions (or libraries) within C, and do anything you needed to do. You could "extend the language by adding library functions" without having to "extend the language by changing the compiler or the shipped-with-the-compiler libraries". Some of those library extensions could be useful enough to sell as a package, and people did. That's not the same as what you had to do with Pascal. > I have some 1980's books with lots of extending and dialects like RatC. Yes, some people also altered the syntax in various ways. But that wasn't necessary with C the way it was with Pascal.