Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!ogicse!zephyr.ens.tek.com!uw-beaver!stowe.cs.washington.edu!pauld From: pauld@stowe.cs.washington.edu (Paul Barton-Davis) Newsgroups: comp.text.tex Subject: Re: Why use TeX if ... Message-ID: <1991May10.215729.27344@beaver.cs.washington.edu> Date: 10 May 91 21:57:29 GMT References: <1991May9.204113.17636@beaver.cs.washington.edu> <1991May10.065219.23433@agate.berkeley.edu> <1991May10.211802.4344@csrd.uiuc.edu> Sender: news@beaver.cs.washington.edu (USENET News System) Organization: Computer Science & Engineering, U. of Washington, Seattle Lines: 54 In article <1991May10.211802.4344@csrd.uiuc.edu> eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) writes: >edward@priam.Berkeley.EDU (Edward Wang) writes: > >>In article <1991May9.204113.17636@beaver.cs.washington.edu> pauld@stowe.cs.washington.edu (Paul Barton-Davis) writes: > >>>The hacking problem is primarily caused by the fact that the TeX >>>extension language was designed (apparently) as a macro replacement >>>language. If TeX has a "normal" or "proper" programming language, then >>>it would a lot easier to extend, without getting used to its >>>arcane grammar. > >What do you mean 'arcane grammar'? TeX, like that other >symbolic language Lisp, has no syntax to speak of. >Control sequences are trivially recognised, macro argument >absorbtion uses only the simplest type of pattern matching. >Some trivial facts about braces, and there you have >the whole of TeX. > Well, its not just a question of syntax. TeX, unlike Lisp and most other languages, does not have what I would call a "proper control flow" facility. It has no scope. Opertators, like braces, are overloaded.The primitives in TeX seem fundamentally rooted in typesetting, not programming. Hence, they are great for doing typesetting effects, and not so good for doing programming. > >>I agree. I can think of three things wrong with the Tex language: >>textual substitution macros (rather than functions or even >>Lisp-like macros), > >One. Lisp has (as I said above) like TeX the 'program is data' >principle; macros accept arbitrary pieces of list >and does textual substitution. > This might be true for Lisp macros, but not for Lisp functions. Although people often talk of Lisp's treatment of data and program as equivalent, my experience has been that you have to work quite hard to use that in any meaningful way. Anyway, I wouldn't argue that lisp is the idea language. When Tim & I started TinT, we chose lisp because we both use and hack emacs a lot, xlisp was avaible as a base (as was scheme & T) it seemed like a good model (AutoCAD seems to agree). If there was a free C interpreter available, we might have looked at that. -- Paul Barton-Davis UW Computer Science Lab "People cannot cooperate towards common goals if they are forced to compete with each other in order to guarantee their own survival."