Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!ukc!tcdcs!dce.ie!em From: em@dce.ie (Eamonn McManus) Newsgroups: comp.text.tex Subject: Redesigning TeX (was: Why use TeX if ...) Message-ID: Date: 14 May 91 21:00:33 GMT References: <1991May9.204113.17636@beaver.cs.washington.edu> <1991May10.065219.23433@agate.berkeley.edu> <1991May10.211802.4344@csrd.uiuc.edu> Organization: Datacode Communications Ltd, Dublin, Ireland Lines: 46 In my opinion the TeX language, as opposed to the implementation, is not as neatly designed as it might be. (I'll leave comments on the implementation for another day.) It's not true to say that TeX has no syntax to speak of. Primitives should have been designed where possible to have a syntax that could be described by macros, if only to the extent of surrounding their arguments with braces. It's ridiculous that there should be constructs like \hskip 1pt plus 3fil where TeX determines pretty much by magic where the argument ends. (And if the next word happens to be `minus' the unwary user is in for a nasty surprise.) I see no reason why this could not have been \hskip{1pt plus 3fil} or, eliminating dimension keywords completely and using the implicit multiplication feature, \newdimen\pt \pt=65536\sp \hskip{1\pt plus 3\fil} There are numerous other syntactical complexities: consider \halign, \hrule, \hbox, \leaders, \let, etc. I'm not saying that all of these should be shoe-horned into a brace-delimited form, but there is certainly more complexity in the syntax than necessary. In discussing the number of primitives, I don't think it is meaningful just to count the number of asterisks in the TeXbook's index. Some primitives are just parameters, like \parindent and \maxdeadcycles and \abovedisplayshortskip. Others are easily expressible in terms of other primitives, and are either there for efficiency (this is presumably the case for \hfil etc) or because they never got removed (there doesn't seem to be a good reason for \gdef given \global). It would be nice to tidy up the primitives a bit: do we need both \raise and \lower? Shouldn't we have a parameter \interaction instead of \nonstopmode etc? If we didn't have \futurelet could we make do with \let and \afterassignment? Would it be a terrible thing if \gdef and \above and \hfilneg were macros in plain.tex instead of primitives? One other thing I would like to change is the builtin limit in the language design of having 256 of each sort of register. It would make much more sense (though perhaps at the expense of efficiency) if \newdimen etc were the primitives and we forgot about \dimen. Having bitched so much I must say that I think that TeX as it stands is a wonderful system and its design, despite my complaints, is excellently done. Having something as portable as the existing system is much more important than ironing out a few design nits. , Eamonn