https://github.com/pleumann/pasta80/issues/7#issuecomment-28...
https://github.com/pleumann/pasta80/issues/7#issuecomment-28...
Thanks for spoiling my upcoming weekend. :)
After I learned C and started using it, I noted that I experience five times more memory-related issues in C programs than in an equivalent Pascal code I was writing before.
During that era, Pascal had a remarkable advantage few other languages could match: it used a single-pass compiler that generated machine code as it parsed the source code. No intermediate representations or syntax trees - just a direct translation from source to machine code, all thanks to the well thought-out language syntax invented by Nicolas Wirth. That feature made Pascal compilers incredibly fast.
In turn, it allowed to tighten up a typical development cycle of the day: (edit -> compile -> run) x N times. Given typical CPU speeds of the time, it made a night and day difference. For example, given the same piece of software under development with a comparable number of lines, Turbo Pascal development cycle was about 5 seconds, while Turbo C gave you 40 seconds of a round-trip time at best.
Pascal was the right tool at the right time. Both Apple and Microsoft initially used Pascal to develop their operating systems.
When available CPUs started to become faster and faster, that particular Pascal advantage began to fade out and other languages commenced eating away its market share. Somewhere between 1986 and 1992, software houses were switching to C in flocks.
I wasted so much productive time learning/writing C for the sake of learning/writing C instead of just doing the work in Pascal back then.
Later on I had the same problem, I already knew Rails but wanted to do Python/Django just becuase.
Just FWIW, you can still find Z80s listed for sale all over the usual e-merchants and people absolutely still design around them. It wasn't discontinued until last June, and there's an updated eZ80 design still made and sold by Zilog.
Later, we also got the managed language genealogy, via Modula-2+ branch, and Niklaus Wirth own Oberon variants, or inspired dialects from it.
Nowadays GCC has Ada, Modula-2 and Algol 68 as official frontend, we have Free Pascal and Delphi.
Then we also have all the other modern ones that somehow got some inspiration out this history.
Thus we as an industry aren't lacking alternatives.
I mentioned it here recently but, we use Delphi at work, the Turbo Pascal successor. A full release build of our main project is about 2 million lines of code, and compiles and links in about 40 seconds on my laptop which has an Intel i7-1260P. A mere compile is of course typically much faster.
I haven't benchmarked it recently myself, but back in the 2000s code generation was quite decent. It was good enough I decided to stop handwriting assembly, as writing compiler-friendly code was significantly faster and much more readable.
[1] People often forget how compact a language Pascal (and somewhat M2) is. It comfortable self-hosts on 8-bit machines with a few dozen K (not M) of memory. It does an OK job even on the 6502 (admittedly, p-code). There was even a cross compiler for the 8051.
Unfortunely its adoption window has passed by, although there is a guy keeping it going on Github, from the official Critical Mass compiler that once existed,