Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!s41.csrd.uiuc.edu!eijkhout From: eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) Newsgroups: comp.text.tex Subject: Re: Why use TeX if ... Message-ID: <1991May13.220314.17535@csrd.uiuc.edu> Date: 13 May 91 22:03:14 GMT References: <1991May9.164341.14084@csrd.uiuc.edu> <1991May9.204113.17636@beaver.cs.washington.edu> <1991May10.065219.23433@agate.berkeley.edu> <1991May10.211802.4344@csrd.uiuc.edu> > From: Victor Eijkhout >> Message-Id: <1991May10.211802.4344@csrd.uiuc.edu> >He really meant arcane *semantics* -- what is expanded when and why and >how to change this sequence and why. One of the problems with TeX is >precisely that it does lack syntax -- and hence structure. It lacks syntax? You mean every input is legal? >> But I do agree that the language is arcane. This is a consequence >> of the fact that TeX is not really processed by a single >> interpreter, but rather by three or four processor[s]. >> 1/ The input processor; > -- which Knuth calls the eyes; >> 2/ The expansion processor, and > -- the mouth; >> 3/ The execution processor. > -- the stomach. I try not to use those anthropomorphic terms, because they are farfetched, slightly revolting, and in any case nowhere near accurate. >In other words: TeX is a macro language -- all macro languages are like >this. Sorry, TeX is the only macro language that I know, so I can't judge that. In any case, the fact that TeX can redefine its syntax dynamically may be common to all macro languages, it is not common to the programming languages that most people use, and it is downright disturbing to people who haven't programmed at all. >The eyes and stomach >are not what makes TeX arcane; it is the fact that TeX's only >abstraction mechanism is textual substitution (macro replacement). I guess we will keep disagreeing on this. Although I fail to see how a paucity of means would make a language arcane. If anything, it would make it simpler. >Having TeX as a non-macro-based language does not imply that it must >resemble C or Pascal or Lisp (although if TeX *programs* resembled (say) >Lisp or Pascal rather than just a mess of backslashes it would be no bad >thing). As I pointed out in another msg five minutes ago, TeX processes its input sequentially. There is no 'source code' that accepts the 'input text' and processes it: there is only the input text. Therefore macros are the only principle for such a model of typesetting. I don't see immediately how you would implement any system for typesetting that is of a markup principle and that is not essentially a macro language. Victor.