
Use Turbo Modula-2 Instead of Turbo Pascal Under CP/M? (2013) - tomcam
http://techtinkering.com/2013/03/12/if-only-borland-had-stuck-with-turbo-modula-2-for-cpm/
======
_ph_
This brings back fond memory of using Modula-2 on the Amiga. The local Modula
implementation even produced faster and smaller code than the default C
compiler. While Turbo Pascal basically retrofitted all important parts from
Modula onto Pascal, it would have been nice to have a Turbo Modula-2 on the PC
too. Actually I would like to have a modern version of that around still.

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.

~~~
vrotaru
XDS Modula-2 - [https://www.excelsior-usa.com/xds.html](https://www.excelsior-
usa.com/xds.html)

------
pjmlp
The mind behind Turbo Modula-2 was Martin Odersky from Scala fame.

~~~
reacweb
It seems TM2 compilation was very slow and was producing faster but also
bigger programs than TP. This looks like the main complaints about scala ;-).

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.

~~~
pjmlp
Never thought about it that way. :)

------
FullyFunctional
While arguably Modula-2 two was an improvement upon Pascal, Turbo Pascal was
an amazing implementation and fixed enough of Pascal issues that it won.

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].

------
mhd
Note the compilation times. Turbo Pascal was pretty awesome in that regard. On
the other hand, this was TP 3, which Modula handily beats on, well,
modularization. IIRC all you could do in those early days was literal
preprocessor includes and that weird overlay thing.

------
chasingthewind
One of the primary languages I was taught in college was Modula-3. At the time
it was a huge improvement over both Pascal (which was also taught) but it had
some of the same power as C++ but was much safer. I was always a bit sad it
didn't catch on.

~~~
pjmlp
It is one of my favourite GC enabled system programming languages.

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](https://github.com/modula3/cm3)

Last commit 4 days ago.

------
narag
It seems the difference in execution could be that modula interprets array of
boolean as a tp set. I'd be curious to see the time of tp using set instead.

Edit: to clarify, the differece would be array access vs. bit mask of a
variable.

------
sedatk
Orders of magnitude difference in buid time is significant enough. Sample code
also shows no tangible benefit in using Modula/2\. No wonder it went away
quickly.

Oberon, on the other hand, is an entirely different story.

~~~
mhd
I'll do my Cato part: Let's not forget Modula-3.

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…

~~~
pjmlp
> Let's not forget Modula-3.

[https://github.com/modula3/cm3](https://github.com/modula3/cm3)

Last commit 4 days ago. :)

------
sehugg
It might be nice to have a standalone Z80 compiler for Modula-2 (or TP, for
that matter) for retro game programming. Of course, you're going to have to
emulate this compiler since it's also written in Z80 machine code...

~~~
torsion17
There is Hochstrasser's Modula-2
([http://www.cpm.z80.de/develop.htm](http://www.cpm.z80.de/develop.htm)) and
Turbo-M2 comes with Yaze ([http://www.mathematik.uni-ulm.de/users/ag/yaze-
ag](http://www.mathematik.uni-ulm.de/users/ag/yaze-ag)).

