9 ms·
If only Borland had stuck with Turbo Modula-2 for CP/M (2013)
- krallja 4y ago(2013)
- xioxox 4y agoThere were other Modula-2 compilers for CP/M. I used Hisoft FTL Modula-2 quite a bit on my Amstrad PCW to get a speedup from Mallard Basic.
- deleted 4y ago[deleted]
- bruce511 4y ago>> Why TM-2 made such a fleeting appearance is shrouded in mystery. It was released in 1986 by Echelon under license from Borland and then quickly withdrawn. I wasn't there, but dots can be drawn. Niels Jensen, Borland founder, and his team created turbo pascal, then added Philippe Kahn to the mix to head the US company. Niels and his team also wrote a Modula 2 and C compiler, but Philippe instead chose to buy Wizard C, and market that as Turbo C instead. This lead to a split inside Borland, Niels and the rest leaving to form JPI which released their work as Topspeed C, and Topspeed Modula 2. My speculation is that Modula 2 was killed at Borland as a direct result of the split.
- pjmlp 4y agoMartin Odersky of Java generics (Pizza compiler) and Scala fame, worked on Modula-2 compiler at Borland.
- dbrower 4y agoPart of it is that by 1986, CP/M was dead for new development of anything, and Modula-2 was also on fumes. It would have been business malpractice to spend money on CP/M products at that point.
- FullyFunctional 4y agoSo? TP real success came with the port to DOS, but TM2 couldn't have been much harder to port.
- bonzini 4y agoThey probably reused a lot of ideas in Turbo Pascal 4.0. It had units which were very similar to Modula 2 modules, except that interface and implementation were in a single file.
- FullyFunctional 4y agoProbably, but there were many other language differences in Modula-2 that made it a better language. I suspect the real reason was the usual one: inertia. A lot more people knew Pascal and thus more bought TP than TM2. <something something about technical merit and popularity contests>
- pjmlp 4y agoMost of those ideas come from USCD Pascal, and the later Object Pascal introduced in Turbo Pascal 5.5 came from Apple's Object Pascal, which was derived from Clascal and developed in collaboration with Wirth.
- tengwar2 4y agoDepends on the country. In the UK, the Amstrad 8256 and 8512 were very popular, and they were only launched in 1985. They were much cheaper than PCs of the time, and came with wordprocessor package and CP/M 3.0. We had about 25 of them in our lab, including one floating at 4000V in a perspex cage, used to control a C14 accelerator. From memory, I used TP and them TM2 on CP/M to run an automated thermoluminescence rig, then FTL Modula 2. I wasn't very professional at the time, but then no-one was - most of us were working in isolation. Speaking from that perspective, I was not very impressed with Modula 2. The issue was not with the fundamentals, but the way that it was case sensitive and forced you to use caps for all the keywords, so that it was really annoying to type. As a lesser issue, the names used for type conversions between numeric types seemed to have no rationale, so they were easy to forget. I don't remember exceptions in TM2, and they would not have been part of the standard language. They appear to have come in with Modula-2+.
- tomcam 4y agoThe PC Turbo Pascal compiler was written in assembly by Anders Hejlsberg, of C# and Typescript fame.
- wdb 4y agoPersonally, I always have the opposite feeling; C# and Typescript was written by Anders Hejlsberg of Turbo Pascal and Delphi fame.
- tomcam 4y agoVoted with delight because that’s precisely the way I feel. But I’m trying to make it easy for HN’s young whippersnappers to relate ;)
- drunkenmagician 4y agoSecond vote for me. While C# may have the greater 'head count' in usage now. TP and Delphi were ground breaking, revolutionary products IMHO.
- ikeserbestian 4y agoI can't vote but supporting as third :-).
- ThinkBeat 4y ago(wikipedia) The Turbo Pascal compiler was based on the Blue Label Pascal compiler originally produced for the NasSys cassette-based operating system of the Nascom microcomputer in 1981 by Anders Hejlsberg. Borland licensed Hejlsberg's "PolyPascal" compiler core (Poly Data was the name of Hejlsberg's company in Denmark), and added the user interface and editor. Anders Hejlsberg joined the company as an employee and was the architect for all versions of the Turbo Pascal compiler and the first three versions of Borland Delphi.[2]
- ternaryoperator 4y agoThis is the history as I remember it too. IIRC Topspeed C was an excellent compiler.
- linspace 4y ago> Should I Switch From Turbo Pascal to Turbo Modula-2? The million dollar question. More seriously, I love Pascal and similar. My first two books were Algorithms + Data Structures = Programs (Pascal) and Algorithms and Data Structures (Modula 2), both by Nicklaus Wirth.
- mananaysiempre 4y agoPascal and Modula-2 themselves are by Wirth as well :)
- sedatk 4y agoI dislike Modula-2's full upper-case reserved word syntax. I understand the reasoning behind it: to make language constructs consistent and stand out more, but then, upper-case is harder to read. Make no mistake, I use that syntax when writing SQL, and it's very fitting there because the queries are short and I can't tolerate typos due to lack of a compilation step. But, in case of a compiled language, especially with the advent of syntax highlighting and edit-time analysis capabilities, I find it a nuisance.
- mananaysiempre 4y ago> [The reasoning behind] Modula-2's full upper-case reserved word syntax [is] to make language constructs consistent and stand out more I suspect it’s just inherited from ALGOL 68, where you were allowed to use names that coincide with language keywords at the cost of using one of a number of “stropping” conventions[1] to distinguish one from the other: surround each keyword with apostrophes (whence the term) or precede it with a period (if you’re using a single-case character set), type keywords in uppercase (if you’re not), or typeset them in bold (if you’re writing a paper—recall the original ALGOL problem statement was “like pseudocode from our papers but executable”). [1] https://en.wikipedia.org/wiki/Stropping_(syntax) https://en.wikipedia.org/wiki/Stropping_(syntax)
- sedatk 4y agoThat might as well be the case, but Wirth did Pascal eight years before Modula-2, yet the former feels way more modern.
- pjmlp 4y agoNot really, unless you're talking about Extended Pascal or the several dialects. ISO Pascal as Wirth originally designed it, only was modern in the sense of being much easier than ALGOL to implement and master, as learning language. Meanwhile Modula-2 was designed from the start to be a type safe systems programming language, based on Wirth's learnings with Mesa at Xerox PARC.
- yarg 4y ago
- atombender 4y agoI love reading about the history around legendary companies like this. I was an avid Turbo Pascal user starting in 1990 or so. This sent me into a rabbit hole of research. I thought I knew a lot about Borland's history, but what I didn't know was that the original team left Borland in 1987 to form JPI (Jensen & Partners), headquartered in London, taking a bunch of in-progress code with them that they bought from Borland for $1.7m. JPI made a range of development tools called TopSpeed, which I remember hearing about back then. Unlike Borland's language tools, TopSpeed was a unified compiler backend with a frontend compiler for each language. JPI eventually merged with Clarion, which made a "4GL" IDE with its own crude Pascal-esque programming language that at one point competed with Microsoft Access, as well as with database-focused IDEs like Microsoft's Visual Basic and Borland's own Delphi. Clarion still exists, though it's now owned by a company called SoftVelocity, and is built on .NET, and looks like it's barely on life support. Of the original Borland founders, I don't know what happened to Niels Jensen, but Ole Henriksen [1] started a business that designs technology for prefab "pod" houses, and Mogens Glad [2] became a movie producer. [1] https://www.linkedin.com/in/ole-henriksen-a731323a/ https://www.linkedin.com/in/ole-henriksen-a731323a/ [2] https://www.linkedin.com/in/mglad/ https://www.linkedin.com/in/mglad/
- mrlonglong 4y agoI actually worked with TopSpeed Modula-2 to develop software for air traffic control training simulators in the late 90s. Interesting language, wouldn't mind finding a copy to play with in my MS-DOS VM some day.
- atombender 4y agoI found a version of Topspeed Modula 2 from 1993 [1], which is after the JPI-Clarion merger. Someone also reverse-engineered Turbo Modula-2 [2], which apparently was the original codebase. [1] https://vetusware.com/download/Topspeed%20Modula%202%203.10/?id=3783 https://vetusware.com/download/Topspeed%20Modula%202%203.10/... [2] https://github.com/Oric4ever/Turbo-Modula-2-Reloaded https://github.com/Oric4ever/Turbo-Modula-2-Reloaded
- 4y ago
- neilv 4y agoI don't recall ever seeing the branding "Turbo Modula-2", but I'd been a Turbo Pascal fan (even owned Turbo Pascal original 8-inch floppy for generic MS-DOS, and used it on an 3.x MHz 8086/8088 that had no PC BIOS), and used Modula-2 in school. I recall there were multiple Modula-2 implementations for the PC at the time. The one I used didn't have as much PC-specific access as Turbo Pascal (at the time, I had my own libraries for video RAM direct writes, mouse, etc., and GUI I'd built atop that). And the Modula-2 language felt a bit clunkier to use, since I was favoring terseness on 80x25-character screens at the time. Where Modula-2 and pedagogy around interface vs. implementation in team software engineering class paid off, for me, was that I became a professional C programmer right after, and some of those practices enforced by Modula-2 were a useful perspective to bring to cross-platform Unix .c and .h files at the time.
- int_19h 4y agoModula-2 had somewhat more verbose syntax for derived types (e.g. POINTER TO X rather than ^X), but given that it didn't require a BEGIN for every END, wouldn't it be more terse vertically overall?
- nope96 4y agoPreviously posted: Use Turbo Modula-2 Instead of Turbo Pascal Under CP/M? (2013) https://news.ycombinator.com/item?id=16704733 https://news.ycombinator.com/item?id=16704733 [2018, 21 comments] Also interesting: Turbo Pascal: A Great Choice for Programming Under CP/M (2013) https://news.ycombinator.com/item?id=25956128 https://news.ycombinator.com/item?id=25956128 [2021, 115 comments]
- yawaramin 4y agoJust for fun, here's the Modula-2 example converted into OCaml in a few minutes of effort: let size = 8191 let flags = Array.make size false let prime = ref 0 let k = ref 0 let count = ref 0 let () = print_endline "Type Return"; ignore (input_char stdin); print_endline "10 iterations"; for iter = 1 to 10 do count := 0; for i = 0 to size - 1 do flags.(i) <- true done; for i = 0 to size - 1 do if flags.(i) then prime := i + i + 3; k := i + !prime; while !k < size do flags.(!k) <- false; k := !k + !prime; done; incr count; done; done; Printf.printf "%d primes\n%!" !count If one didn't look closely it could easily be mistaken for Pascal/Modula-2. OCaml lifts a lot of imperative constructs directly from that lineage while adding its own FP flavour i.e. immutability by default meaning that mutable values must be ref or array values. Another aspect that OCaml lifts pretty directly from Modula-2 is the engineering of its separate compilation via its module system. By comparing the compiled interface files, a build system like dune or ReScript can figure out the least amount of recompilation needed to build a project from a dirty state.
- deleted 4y ago[deleted]
- mrlonglong 4y agoI just did some googling and it turns out Borland did do a version for MS-DOS but it was sadly never released. Dare I hope it's still out there somewhere waiting to be out in a museum?
- petilon 4y agoBorland doesn't enough credit (or blame, depending on your opinion about C++) for popularizing C++. Turbo C++ was the first mainstream C++ compiler. All that existed before was Cfront, Stroustrup's pre-compiler which translated C++ to C. C++ wasn't a popular language until Borland released Turbo C++. Because of the IDE wars of the 1990's, Microsoft answered with Visual C++, and the rest is history. [1] https://cplusplus.com/info/history/ https://cplusplus.com/info/history/
- Iwan-Zotow 4y agoZortech C++ was first
- petilon 4y agoThat wasn't a mainstream compiler, and certainly wasn't the reason for Microsoft responding with Visual C++, or C++ becoming popular.
- pjmlp 4y agoIt might have been, yet it was nowhere to be found on most European countries. It was Borland vs Microsoft all over the place, then we got Watcom and MetaWare High as well. When I finally started to see Zortech on sale, it was after the Symantec acquisition where they made an agreement with Microsoft to also ship MFC. So why not get the real deal directly from Microsoft.
- bluedino 4y agoWalter Bright (the author) posts here from time to time, I swear he made a comment before with the background of each of the major C++ compilers
- Iwan-Zotow 4y agoYeah, the D guy
- WantonQuantum 4y agoFor a brief period of time, Visual J++ was the best Java IDE around.
- WantonQuantum 4y agoThis hit me right in the nostalgia feels. I used Turbo Pascal and Turbo C heavily in high school and university. The computer science faculty at my university had their own modula-2 compiler (gpm) so many of our assignments had to be done in modula-2. I would have loved a TPM-2. Additionally, my primary school had an Apple IIe, on which I would sometimes use CP/M. My Amstrad CPC464 could run CP/M, too.
- boffinAudio 4y agoSame, nostalgia-wise. I still have my old Atari Portfolio with the Turbo C compiler onboard, it is easily one of my most treasured nerd artifacts, given that I wrote thousands of lines of code on the thing and used it to become a skilled C developer .. Its crazy to think we can't really get a C compiler in our pockets, now, as easily as we once did.
- mhd 4y agoIf you're reading the magazines of that time period, you'll find a lot of Modula-2 exposure as some regarded it as the next step in the language's evolution (and a more standardized one than Pascal). On the other hand, Ada was mentioned, too. So if Borland would've supported M-2 more, maybe that would've meant that they had supported another standardized language later on, instead of further messing with Pascal. Picture the Delphi IDE with Ada95. (As much as I like both Modula-3 and Oberon, I picked the more likely candidate for this alternate reality. The one where they're all beaten by Visual SAIL is further down the weirdness ladder.)
- wdb 4y agoUncle used Module-2 to write simulators or a calculator for air venting of tunnels or something like that. I think that software was used until the late 90s, early 2000s. He was even updating it after his retirement :)
- drewg123 4y agoWhy did Turbo Modula-2 produce a binary that was 3x as fast as Pascal? Is M2 more suitable for aggressive optimization? Was the M2 compiler just better, with the tradeoff of a much longer compilation time (9x)? M2 seems like a forgotten language. It was what my intro to CS course was taught in back in 1989, and I really haven't seen much mention of it since.. We used some compiler on Macs that was super flaky. I remember the Macs would sometimes lock solid when compiling M2. I also remember grumbling because Pascal seemed to compile faster on the Apple IIs back in highschool than M2 did on the Macs in college. Thankfully we switched to C on SunOS or Ultrix for the upper level classes.
- nl 4y agoBack then there was a war between Pascal-derived (eg Modula2) languages and C-derived languages. http://www.cs.oberlin.edu/~jwalker/lisa-legacy/ http://www.cs.oberlin.edu/~jwalker/lisa-legacy/ is some interesting reading on this, but in the end C won.
- whyenot 4y agoI purchased TM-2 from Echelon in 1986. I was a minor, so I went to Echelon's office in Los Altos and paid cash for an 8" floppy. TM-2 was awesome, but extremely buggy. I used it on an Altos ACS8000, a 4-user machine that originally ran MP/M and would have been $10-20k new. My dad and me got it used at a computer swap meet for maybe $500. My dad helped me to get CP/M running on the machine, and it was great because it could use some of the extra memory in the ACS8000 as a small ram disk. A few years later, I used TM-2 for all my assignments in AP Computer Science, and it sucked having to work around all the bugs. I'm kind of wistful thinking about it now, because that was right around the time I began to realize that in classes I was almost always the only female in the room. It led to a lot of unwanted attention and awkward situations. Eventually it led to me changing careers.
- kragen 4y agoThis gets me in the feels. What career did you change to?
- billpg 4y ago8 inch floppies in 1986? My recollection was that the 5¼ inch floppy was ubiquitous with 3½ inch floppies as the up and coming next-generation technology.
- boffinAudio 4y ago8-inch floppies were actually quite common in the mid-80's on machines such as the OP described. I've still got a few stashed in some archives somewhere, with old code I wrote. I shudder to think the effort required to use those floppies again somehow, though .. not exactly the same dilemma I face with the drawer full of Iomega JAZ and ZIP drives, though .. :P
- zozbot234 4y agoYou might want to copy that stuff ASAP if you haven't done so already, because it's not going to get any easier to read in the future. Both due to age of the media itself and the weird formats involved, for which reading equipment is starting to get quite rare and hard to find.
- brakmic 4y agoEven better, imo: Modula-3 https://github.com/modula3/cm3 https://github.com/modula3/cm3 There are binaries for various architectures. https://github.com/modula3/cm3/releases/tag/d5.11.4 https://github.com/modula3/cm3/releases/tag/d5.11.4
- pjmlp 4y agoIf one can get hold of the Modula-3 books I would advise it. It shows the path of having GC enabled systems programming languages, which also offers all features at C++ level (minus template metagramming and macros), and how we could already be there in the early 1990's, had it not been for the Compaq merges messing it all up.
- heisenbit 4y ago34KB vs. 142KB was a huge difference at a time when 64KB was the standard addressable space.
- gadders 4y agoIf they'd kept Modula-2, the fact that I learnt Modula-2 for my degree in the 90's might be worth something.
- unnouinceput 4y agoQuote: "writeln('Type Return'); readln(ch);" The reason for these 2 statements are...? Because I fail to see their purpose.
- lelanthran 4y ago> Quote: "writeln('Type Return'); readln(ch);" > The reason for these 2 statements are...? Because I fail to see their purpose. The first is to display the prompt "Type Return" (think of it as "Hit enter to continue"). The `readln(ch)` waits for the user to hit the return key. Without the readline, the prompt will be displayed and the program will continue without waiting for the user to press return.
- unnouinceput 4y agoyou know what your answer is like? the same like asking for "where can I find water?" when in a dessert and you answer with "the Ocean". Technically correct, but totally missing the point.