Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!labrea!decwrl!pyramid!prls!philabs!rob From: rob@philabs.Philips.Com (Rob Robertson) Newsgroups: comp.sources.d Subject: Re: ctex documentation (why c is better than pascal) Message-ID: <1698@briar.Philips.Com> Date: Wed, 9-Sep-87 13:26:39 EDT Article-I.D.: briar.1698 Posted: Wed Sep 9 13:26:39 1987 Date-Received: Sat, 12-Sep-87 06:31:48 EDT References: <1742@cp1.BELL-ATL.COM> <540@rocky.STANFORD.EDU> <4313@ncoast.UUCP> <1109@vu-vlsi.UUCP> Reply-To: rob@briar.philips.com (Rob Robertson) Organization: Philips Laboratories, Briarcliff Manor, NY Lines: 31 Summary: another reason for ctex In article <1109@vu-vlsi.UUCP> 164485913@excalibur.UUCP (Mark Schaffer) writes: >While it is true that TeX written in pascal is very difficult to work on >if you only have a C compiler, isn't the reason TeX was originally written >in pascal was because everyone and their Aunt Sophie knows enough pascal >and probably has access (somehow) to a pascal compiler. I think that if >this is indeed the case, why do people make it difficult for themselves, >and some others, by rewriting it in C? The berkeley pascal compilers ON 4.X BSD VAXEN is a pig, it generates enormous code that runs slow. By just doing a Pascal->C translation a gain of about 20-30 percent can be achieved. If you profile it and optimize the C code you can do alot better. TeX is a good subject for this type of translation because it is pretty big, and one can readily notice the improvement in speed in the translated version. When TeX82 was written (1982, the previous versions of TeX were written in SAIL), Pascal was a very good choice. At the time it was the most popular structured language (remember Knuth is a Computer Scientist, so FORTRAN and COBOL are out) across vendor lines and C to most people was just the third letter in the alphabet. So Knuth wrote it in Pascal, and did a pretty good job of it. rob -- william robertson rob@philabs.philips.com "better living through shell scripts"