Use Turbo Modula-2 Instead of Turbo Pascal Under CP/M? (2013)
techtinkering.com
techtinkering.com
One of the aspects why I like Go is, that it included many of the good parts of Modula-2, giving them a more modern look by using the C-style syntax.
At that time, memory was very tight (I was fighting to have all my code compile in less than 64kb) and compilation time was significant.
And Peter Sollich went to Microsoft after Borland.
Turbo Pascal started life as BLS Pascal for Nascom 2 by Anders Heilsberg, published by Poly Data in 1981. In was quickly ported to CP/M and renamed COMPAS Pascal, brought into Borland and renamed Turbo Pascal, then ported to DOS ...
I worked professionally with the latter and worked on a large system which would have been impossible without the Unit module system that TP added.
If Modula-2 had existed with Anders started BLS Pascal, he'd almost certainly had based it on that and it would have been better. I don't think it would have mattered though. In the end C won and would still have won (even though it is a less safe language).
[I don't like Wirth's syntax, so I've been reskinning Oberon-07 to look more Nim-like].
The most well known version, Critical Mass Modula-3, was made open source and some devs are still developing it.
https://github.com/modula3/cm3
Last commit 4 days ago.
Edit: to clarify, the differece would be array access vs. bit mask of a variable.
Oberon, on the other hand, is an entirely different story.
In the MS-DOS golden days, Turbo Pascal was the best Pascal dialect, to the point it was more relevant if a Pascal compiler was compatible with Turbo Pascal dialect than with the ISO Pascal.
Also the reason why although ISO Extended Pascal was created as a means to solve the initial complains regarding ISO Pascal, almost no one cared about its existence.
Modula-2 had more commercial success on other systems.
And yes, the sample code shows no benefit, but once your code grows, Units/Modules are pretty nice to have, even on constrained systems. And this version of Turbo Pascal didn't have this (nor Pascal in general, resulting in huge hodgepodge of incompatible dialects).
I never did much with coroutines in general and don't know how useful they'd be on a Z80 CP/M system…
https://github.com/modula3/cm3
Last commit 4 days ago. :)