Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A major issue was that C compilers were actually fairly ill-suited for 8-bit processors with limited memory, limited processing power, and at most a floppy disk (if that) for external storage.

Pascal was designed to allow single pass compilation of programs, while the C preprocessor alone was a source of what was immense overhead at that time. On CP/M, Turbo Pascal blew all C compilers out of the water in terms of compilation speed. The one C compiler I had on a ZX Spectrum at the time did not actually implement the full language so that you'd have some memory left over (I remember that the C type cast syntax was replaced with a keyword in order to simplify the parser, for example).

That said, UCSD-Pascal on an Apple II (which we got to use in school as part of our regular computer science course), was not all that convincing as an implementation (even if the system as a whole was fairly impressive). Because it used a bytecode interpreter (even if that bytecode interpreter leveraged type information and was much faster than a bytecode interpreter for a dynamically typed language), execution speed – including that of the development environment, which was written in UCSD-Pascal itself – was still pretty sluggish in comparison to an actually compiled language. (The UCSD p-code in principle also allowed compilation to native code, but at least the system I had access to – that was in the early 80s – didn't support that.) But it was still more pleasant than many other compilers, and that was at a time when cassette recorders were often still the primary external storage medium, so people were more tolerant, when their point of comparison was systems that literally included source code from cassette tape at compile time, because for large programs you couldn't fit both the source code and the object code into memory at the same time.



C was also designed to compile in one pass, hence the need for forward references. The preprocessor was extra overhead, though.

Also, from my recollection, Turbo Pascal was not just faster than C compilers. It was also faster than other Pascal compilers. And pretty much any other computer regardless of language. That was part of its appeal.


Correction (in a comment since I'm past the editing time window): "pretty much any other compiler".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: